Commit c9558666 by Bodor Máté

Create template return the created image

parent e01d873c
Pipeline #764 failed with stage
in 37 seconds
...@@ -159,10 +159,11 @@ class OSVirtualMachineManager(InstanceInterface, OpenStackConnection): ...@@ -159,10 +159,11 @@ class OSVirtualMachineManager(InstanceInterface, OpenStackConnection):
@openstackError @openstackError
def create_template(self, name_or_id, template_name, metadata=None): def create_template(self, name_or_id, template_name, metadata=None):
instance = self._get_openstack_server(name_or_id) self.openstack.compute.create_server_image(name_or_id,
self.openstack.compute.create_server_image(instance,
template_name, template_name,
metadata) metadata)
image = self.openstack.compute.find_image(template_name)
return image
def get_vnc_console(self, server_id): def get_vnc_console(self, server_id):
with client.Client("2", session=self.client_session) as nova: with client.Client("2", session=self.client_session) as nova:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment