diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-06-19 15:33:22 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-06-19 15:33:22 +0000 |
commit | 53a5919884b98613a99fe7a8397e9f2f01190b8f (patch) | |
tree | 1422b88cbba6ca6da5e45bf50690d152ceb529ab /extensions/openstack.write | |
parent | cd9e3ba567a704af2585ad5b46d5b1eb9609fdd4 (diff) | |
parent | e4c6b8a69f0df2d0b3beac46865a66e0de527151 (diff) | |
download | definitions-53a5919884b98613a99fe7a8397e9f2f01190b8f.tar.gz |
Merge branch 'baserock/adamcoldrick/remove-dependencies-v3'
This stops the deployment extensions from depending on morphlib
and cliapp, as well as setting the definitions version to 5.
Reviewed-by: Sam Thursfield <sam.thursfield@codethink.co.uk>
Reviewed-by: Paul Sherwood <paul.sherwood@codethink.co.uk>
Diffstat (limited to 'extensions/openstack.write')
-rwxr-xr-x | extensions/openstack.write | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/extensions/openstack.write b/extensions/openstack.write index 67e07c18..f1233560 100755 --- a/extensions/openstack.write +++ b/extensions/openstack.write @@ -17,21 +17,22 @@ '''A Morph deployment write extension for deploying to OpenStack.''' -import cliapp import os +import subprocess import tempfile import urlparse -import morphlib.writeexts +import writeexts -class OpenStackWriteExtension(morphlib.writeexts.WriteExtension): +class OpenStackWriteExtension(writeexts.WriteExtension): '''See openstack.write.help for documentation''' def process_args(self, args): if len(args) != 2: - raise cliapp.AppException('Wrong number of command line args') + raise writeexts.ExtensionError( + 'Wrong number of command line args') temp_root, location = args @@ -86,7 +87,7 @@ class OpenStackWriteExtension(morphlib.writeexts.WriteExtension): '--disk-format=raw', '--container-format', 'bare', '--file', raw_disk] - cliapp.runcmd(cmdline) + subprocess.check_call(cmdline) self.status(msg='Image configured.') |