summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-07-09 14:49:38 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-07-09 15:01:39 +0000
commitfd9e59e10a11c61c0b708de90aea0b9cea9e84a4 (patch)
treefe6aa2ec275eec4ffa51921d6f212bb6a1327b0b
parent0b6226400286fc6ba772d47d06773b74a435df17 (diff)
downloadmorphs-fd9e59e10a11c61c0b708de90aea0b9cea9e84a4.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-xkvm.write4
-rwxr-xr-xvirtualbox-ssh.write4
2 files changed, 8 insertions, 0 deletions
diff --git a/kvm.write b/kvm.write
index 9a6be13..8cbec94 100755
--- a/kvm.write
+++ b/kvm.write
@@ -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')