summaryrefslogtreecommitdiff
path: root/saharaclient/api/cluster_templates.py
diff options
context:
space:
mode:
Diffstat (limited to 'saharaclient/api/cluster_templates.py')
-rw-r--r--saharaclient/api/cluster_templates.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/saharaclient/api/cluster_templates.py b/saharaclient/api/cluster_templates.py
index 307a080..38e4d4b 100644
--- a/saharaclient/api/cluster_templates.py
+++ b/saharaclient/api/cluster_templates.py
@@ -26,7 +26,8 @@ class ClusterTemplateManager(base.ResourceManager):
def _assign_field(self, name, plugin_name, hadoop_version,
description=None, cluster_configs=None, node_groups=None,
anti_affinity=None, net_id=None, default_image_id=None,
- use_autoconfig=None, shares=None):
+ use_autoconfig=None, shares=None, is_public=None,
+ is_protected=None):
data = {
'name': name,
'plugin_name': plugin_name,
@@ -41,28 +42,33 @@ class ClusterTemplateManager(base.ResourceManager):
neutron_management_network=net_id,
default_image_id=default_image_id,
use_autoconfig=use_autoconfig,
- shares=shares)
+ shares=shares,
+ is_public=is_public,
+ is_protected=is_protected)
return data
def create(self, name, plugin_name, hadoop_version, description=None,
cluster_configs=None, node_groups=None, anti_affinity=None,
net_id=None, default_image_id=None, use_autoconfig=None,
- shares=None):
+ shares=None, is_public=None, is_protected=None):
data = self._assign_field(name, plugin_name, hadoop_version,
description, cluster_configs, node_groups,
anti_affinity, net_id, default_image_id,
- use_autoconfig, shares)
+ use_autoconfig, shares, is_public,
+ is_protected)
return self._create('/cluster-templates', data, 'cluster_template')
def update(self, cluster_template_id, name, plugin_name, hadoop_version,
description=None, cluster_configs=None, node_groups=None,
anti_affinity=None, net_id=None, default_image_id=None,
- use_autoconfig=None, shares=None):
+ use_autoconfig=None, shares=None, is_public=None,
+ is_protected=None):
data = self._assign_field(name, plugin_name, hadoop_version,
description, cluster_configs, node_groups,
anti_affinity, net_id, default_image_id,
- use_autoconfig, shares)
+ use_autoconfig, shares, is_public,
+ is_protected)
return self._update('/cluster-templates/%s' % cluster_template_id,
data, 'cluster_template')