From db3ade4fc72f10f14deb424fccd9d8e6f5e5bb4e Mon Sep 17 00:00:00 2001 From: Telles Nobrega Date: Thu, 12 Jul 2018 14:58:26 -0300 Subject: Adding boot from volume Adding boot from volume to python client. Change-Id: I869e61242de47e802f9d7f1be92427e762bfcf59 Story: #2001820 Task: #22978 --- saharaclient/api/node_group_templates.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/saharaclient/api/node_group_templates.py b/saharaclient/api/node_group_templates.py index db45798..9486e8b 100644 --- a/saharaclient/api/node_group_templates.py +++ b/saharaclient/api/node_group_templates.py @@ -57,7 +57,8 @@ class NodeGroupTemplateManagerV1(base.ResourceManager): auto_security_group, availability_zone, volumes_availability_zone, volume_type, image_id, is_proxy_gateway, volume_local_to_instance, use_autoconfig, - shares, is_public, is_protected, volume_mount_prefix): + shares, is_public, is_protected, volume_mount_prefix, + boot_from_volume=None): self._copy_if_defined(data, description=description, @@ -71,7 +72,8 @@ class NodeGroupTemplateManagerV1(base.ResourceManager): use_autoconfig=use_autoconfig, shares=shares, is_public=is_public, - is_protected=is_protected + is_protected=is_protected, + boot_from_volume=boot_from_volume ) if volumes_per_node: @@ -160,7 +162,7 @@ class NodeGroupTemplateManagerV2(NodeGroupTemplateManagerV1): volume_type=None, image_id=None, is_proxy_gateway=None, volume_local_to_instance=None, use_autoconfig=None, shares=None, is_public=None, is_protected=None, - volume_mount_prefix=None): + volume_mount_prefix=None, boot_from_volume=None): """Create a Node Group Template.""" data = { @@ -178,7 +180,7 @@ class NodeGroupTemplateManagerV2(NodeGroupTemplateManagerV1): volume_type, image_id, is_proxy_gateway, volume_local_to_instance, use_autoconfig, shares, is_public, is_protected, - volume_mount_prefix) + volume_mount_prefix, boot_from_volume) def update(self, ng_template_id, name=NotUpdated, plugin_name=NotUpdated, plugin_version=NotUpdated, flavor_id=NotUpdated, @@ -191,7 +193,8 @@ class NodeGroupTemplateManagerV2(NodeGroupTemplateManagerV1): image_id=NotUpdated, is_proxy_gateway=NotUpdated, volume_local_to_instance=NotUpdated, use_autoconfig=NotUpdated, shares=NotUpdated, is_public=NotUpdated, - is_protected=NotUpdated, volume_mount_prefix=NotUpdated): + is_protected=NotUpdated, volume_mount_prefix=NotUpdated, + boot_from_volume=NotUpdated): """Update a Node Group Template.""" data = {} @@ -210,7 +213,8 @@ class NodeGroupTemplateManagerV2(NodeGroupTemplateManagerV1): volume_local_to_instance=volume_local_to_instance, use_autoconfig=use_autoconfig, shares=shares, is_public=is_public, is_protected=is_protected, - volume_mount_prefix=volume_mount_prefix + volume_mount_prefix=volume_mount_prefix, + boot_from_volume=boot_from_volume ) return self._patch('/node-group-templates/%s' % ng_template_id, data, -- cgit v1.2.1