diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-12-09 17:37:45 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-12-09 17:37:45 +0000 |
commit | d6a8067d6bfd929fa7505e019a4e6ea63e1210ea (patch) | |
tree | fd8c8ae8601050f2538c14769a20c0559e10f604 /morphlib/exts/openstack.write | |
parent | cb880f3554d9cf8daa3839dcd7a7ed2c336df85b (diff) | |
parent | f7ca518de2f6761059d107e0e59ab470dd625192 (diff) | |
download | morph-d6a8067d6bfd929fa7505e019a4e6ea63e1210ea.tar.gz |
Merge remote-tracking branch 'petefoth/pf-document-extensions'
Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk>
Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
Diffstat (limited to 'morphlib/exts/openstack.write')
-rwxr-xr-x | morphlib/exts/openstack.write | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/morphlib/exts/openstack.write b/morphlib/exts/openstack.write index b1941d3c..d29d2661 100755 --- a/morphlib/exts/openstack.write +++ b/morphlib/exts/openstack.write @@ -28,40 +28,12 @@ import morphlib.writeexts class OpenStackWriteExtension(morphlib.writeexts.WriteExtension): - '''Configure a raw disk image into an OpenStack host. - - The raw disk image is created during Morph's deployment and the - image is deployed in OpenStack using python-glanceclient. - - The location command line argument is the authentification url - of the OpenStack server using the following syntax: - - http://HOST:PORT/VERSION - - where - - * HOST is the host running OpenStack - * PORT is the port which is using OpenStack for authentifications. - * VERSION is the authentification version of OpenStack (Only v2.0 - supported) - - This extension needs in the environment the following variables: - - * OPENSTACK_USER is the username to use in the deployment. - * OPENSTACK_TENANT is the project name to use in the deployment. - * OPENSTACK_IMAGENAME is the name of the image to create. - * OPENSTACK_PASSWORD is the password of the user. - - - The extension will connect to OpenStack using python-glanceclient - to configure a raw image. - - ''' + '''See openstack.write.help for documentation''' def process_args(self, args): if len(args) != 2: raise cliapp.AppException('Wrong number of command line args') - + temp_root, location = args os_params = self.get_openstack_parameters() @@ -69,7 +41,7 @@ class OpenStackWriteExtension(morphlib.writeexts.WriteExtension): fd, raw_disk = tempfile.mkstemp() os.close(fd) self.create_local_system(temp_root, raw_disk) - self.status(msg='Temporary disk image has been created at %s' + self.status(msg='Temporary disk image has been created at %s' % raw_disk) self.set_extlinux_root_to_virtio(raw_disk) @@ -120,4 +92,3 @@ class OpenStackWriteExtension(morphlib.writeexts.WriteExtension): self.status(msg='Image configured.') OpenStackWriteExtension().run() - |