diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-07-09 14:49:38 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-07-09 15:01:39 +0000 |
commit | fd9e59e10a11c61c0b708de90aea0b9cea9e84a4 (patch) | |
tree | fe6aa2ec275eec4ffa51921d6f212bb6a1327b0b | |
parent | 0b6226400286fc6ba772d47d06773b74a435df17 (diff) | |
download | morphs-baserock-9.tar.gz |
Add get_vcpu_count to deployment extensions that need itgenivi-F-1.2baserock-9
This is an untidy hack so that baserock 9 can be built and
deployed with baserock 8
-rwxr-xr-x | kvm.write | 4 | ||||
-rwxr-xr-x | virtualbox-ssh.write | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -50,6 +50,10 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): ''' + def get_vcpu_count(self): + '''Parse the virtual cpu count from environment.''' + return self._parse_size_from_environment('VCPUS', '1') + def process_args(self, args): if len(args) != 2: raise cliapp.AppException('Wrong number of command line args') diff --git a/virtualbox-ssh.write b/virtualbox-ssh.write index 1abe233..a498dcb 100755 --- a/virtualbox-ssh.write +++ b/virtualbox-ssh.write @@ -56,6 +56,10 @@ class VirtualBoxPlusSshWriteExtension(morphlib.writeexts.WriteExtension): ''' + def get_vcpu_count(self): + '''Parse the virtual cpu count from environment.''' + return self._parse_size_from_environment('VCPUS', '1') + def process_args(self, args): if len(args) != 2: raise cliapp.AppException('Wrong number of command line args') |