Merge "[Sahara] Adding ability to update missing fields"
This commit is contained in:
commit
37d85d122e
@ -133,7 +133,8 @@ class DataProcessingClusterTemplateTests(test.TestCase):
|
||||
description=ct.description,
|
||||
cluster_configs=ct.cluster_configs,
|
||||
node_groups=ct.node_groups,
|
||||
anti_affinity=ct.anti_affinity)\
|
||||
anti_affinity=ct.anti_affinity,
|
||||
use_autoconfig=False)\
|
||||
.AndReturn(new_ct)
|
||||
self.mox.ReplayAll()
|
||||
|
||||
|
@ -91,7 +91,8 @@ class CopyClusterTemplate(create_flow.ConfigureClusterTemplate):
|
||||
fields = step.action.fields
|
||||
fields["cluster_template_name"].initial = (
|
||||
self.template.name + "-copy")
|
||||
|
||||
fields['use_autoconfig'].initial = (
|
||||
self.template.use_autoconfig)
|
||||
fields["description"].initial = self.template.description
|
||||
except Exception:
|
||||
exceptions.handle(request,
|
||||
|
@ -91,6 +91,7 @@ class EditClusterTemplate(copy_flow.CopyClusterTemplate):
|
||||
cluster_configs=configs_dict,
|
||||
node_groups=node_groups,
|
||||
anti_affinity=context["anti_affinity_info"],
|
||||
use_autoconfig=context['general_use_autoconfig']
|
||||
)
|
||||
return True
|
||||
except exceptions.Conflict as e:
|
||||
|
@ -274,7 +274,8 @@ class DataProcessingNodeGroupTests(test.TestCase):
|
||||
security_groups=[],
|
||||
auto_security_group=True,
|
||||
availability_zone=None,
|
||||
use_autoconfig=True).AndReturn(True)
|
||||
use_autoconfig=True,
|
||||
is_proxy_gateway=False).AndReturn(True)
|
||||
|
||||
self.mox.ReplayAll()
|
||||
|
||||
@ -295,6 +296,7 @@ class DataProcessingNodeGroupTests(test.TestCase):
|
||||
'volume_local_to_instance': False,
|
||||
'volumes_availability_zone': None,
|
||||
'floating_ip_pool': None,
|
||||
'is_proxy_gateway': False,
|
||||
'security_autogroup': True,
|
||||
'processes': 'HDFS:namenode',
|
||||
'use_autoconfig': True})
|
||||
|
@ -81,6 +81,8 @@ class CopyNodegroupTemplate(create_flow.ConfigureNodegroupTemplate):
|
||||
self.template.volumes_availability_zone
|
||||
g_fields['volume_type'].initial = volume_type
|
||||
g_fields['volume_local_to_instance'].initial = volume_local_to_instance
|
||||
g_fields["proxygateway"].initial = self.template.is_proxy_gateway
|
||||
g_fields["use_autoconfig"].initial = self.template.use_autoconfig
|
||||
|
||||
if self.template.floating_ip_pool:
|
||||
g_fields['floating_ip_pool'].initial = (
|
||||
|
@ -99,7 +99,8 @@ class EditNodegroupTemplate(copy_flow.CopyNodegroupTemplate):
|
||||
security_groups=context["security_groups"],
|
||||
auto_security_group=context["security_autogroup"],
|
||||
availability_zone=context["general_availability_zone"],
|
||||
use_autoconfig=context['general_use_autoconfig'])
|
||||
use_autoconfig=context['general_use_autoconfig'],
|
||||
is_proxy_gateway=context["general_proxygateway"])
|
||||
return True
|
||||
except api_base.APIException as e:
|
||||
self.error_description = str(e.message)
|
||||
|
@ -132,6 +132,8 @@ def data(TEST):
|
||||
"volume_local_to_instance": False,
|
||||
"security_groups": [],
|
||||
"volumes_availability_zone": None,
|
||||
"is_proxy_gateway": False,
|
||||
"use_autoconfig": True,
|
||||
}
|
||||
|
||||
ngt1 = node_group_templates.NodeGroupTemplate(
|
||||
@ -150,6 +152,7 @@ def data(TEST):
|
||||
"id": "a2c3743f-31a2-4919-8d02-792138a87a98",
|
||||
"name": "sample-cluster-template",
|
||||
"neutron_management_network": None,
|
||||
"use_autoconfig": True,
|
||||
"node_groups": [
|
||||
{
|
||||
"count": 1,
|
||||
@ -174,6 +177,8 @@ def data(TEST):
|
||||
"volume_type": None,
|
||||
"volume_local_to_instance": False,
|
||||
"volumes_availability_zone": None,
|
||||
"use_autoconfig": True,
|
||||
"is_proxy_gateway": False,
|
||||
},
|
||||
{
|
||||
"count": 2,
|
||||
@ -195,6 +200,8 @@ def data(TEST):
|
||||
"volume_type": None,
|
||||
"volume_local_to_instance": False,
|
||||
"volumes_availability_zone": None,
|
||||
"use_autoconfig": True,
|
||||
"is_proxy_gateway": False
|
||||
}
|
||||
],
|
||||
"plugin_name": "vanilla",
|
||||
@ -221,6 +228,7 @@ def data(TEST):
|
||||
"management_public_key": "fakekey",
|
||||
"name": "cercluster",
|
||||
"neutron_management_network": None,
|
||||
"use_autoconfig": True,
|
||||
"node_groups": [
|
||||
{
|
||||
"count": 1,
|
||||
@ -258,7 +266,9 @@ def data(TEST):
|
||||
"volume_local_to_instance": False,
|
||||
"security_groups": [],
|
||||
"volumes_availability_zone": None,
|
||||
"id": "ng1"
|
||||
"id": "ng1",
|
||||
"use_autoconfig": True,
|
||||
"is_proxy_gateway": False
|
||||
},
|
||||
{
|
||||
"count": 2,
|
||||
@ -303,7 +313,9 @@ def data(TEST):
|
||||
"volume_local_to_instance": False,
|
||||
"security_groups": ["b7857890-09bf-4ee0-a0d5-322d7a6978bf"],
|
||||
"volumes_availability_zone": None,
|
||||
"id": "ng2"
|
||||
"id": "ng2",
|
||||
"use_autoconfig": True,
|
||||
"is_proxy_gateway": False
|
||||
}
|
||||
],
|
||||
"plugin_name": "vanilla",
|
||||
|
Loading…
Reference in New Issue
Block a user