Add option "propagate_task_deploy": True to cluster for example plugin v1

"propagate_task_deploy": True is used for support deployment of cluster
with plugin versions v1 and v2.
Related-Bug: 1572276

Change-Id: Ib4634ed4f68cfdbe3af89a3ffe1a463fe62f3f5d
This commit is contained in:
Alexey Stepanov 2016-04-25 11:35:22 +03:00
parent c51c39282b
commit a59186d4c0
2 changed files with 31 additions and 13 deletions

View File

@ -495,27 +495,42 @@ class FuelWebClient(object):
if option in ('sahara', 'murano', 'ceilometer', 'mongo',
'ironic'):
section = 'additional_components'
if option in ('mongo_db_name', 'mongo_replset', 'mongo_user',
'hosts_ip', 'mongo_password'):
elif option in {'mongo_db_name', 'mongo_replset', 'mongo_user',
'hosts_ip', 'mongo_password'}:
section = 'external_mongo'
if option in ('volumes_ceph', 'images_ceph', 'ephemeral_ceph',
'objects_ceph', 'osd_pool_size', 'volumes_lvm',
'images_vcenter'):
elif option in {'volumes_ceph', 'images_ceph',
'ephemeral_ceph', 'objects_ceph',
'osd_pool_size', 'volumes_lvm',
'images_vcenter'}:
section = 'storage'
if option in ('tenant', 'password', 'user'):
elif option in {'tenant', 'password', 'user'}:
section = 'access'
if option == 'assign_to_all_nodes':
elif option == 'assign_to_all_nodes':
section = 'public_network_assignment'
if option in ('neutron_l3_ha', 'neutron_dvr',
'neutron_l2_pop'):
elif option in {'neutron_l3_ha', 'neutron_dvr',
'neutron_l2_pop'}:
section = 'neutron_advanced_configuration'
if option in 'dns_list':
elif option in {'dns_list'}:
section = 'external_dns'
if option in 'ntp_list':
elif option in {'ntp_list'}:
section = 'external_ntp'
elif option in {'propagate_task_deploy'}:
section = 'common'
if section:
attributes['editable'][section][option]['value'] =\
settings[option]
try:
attributes['editable'][section][option]['value'] =\
settings[option]
except KeyError:
if section not in attributes['editable']:
raise KeyError(
"Section '{0}' not in "
"attributes['editable']: {1}".format(
section, attributes['editable'].keys()))
raise KeyError(
"Option {0} not in attributes['editable'][{1}]: "
"{2}".format(
option, section,
attributes['editable'][section].keys()))
# we should check DVR limitations
section = 'neutron_advanced_configuration'

View File

@ -80,6 +80,7 @@ class ExamplePlugin(TestBasic):
settings={
"net_provider": 'neutron',
"net_segment_type": segment_type,
"propagate_task_deploy": True
}
)
@ -304,6 +305,7 @@ class ExamplePlugin(TestBasic):
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
mode=DEPLOYMENT_MODE,
settings={"propagate_task_deploy": True}
)
plugin_name = 'fuel_plugin_example'
@ -402,6 +404,7 @@ class ExamplePlugin(TestBasic):
settings={
"net_provider": 'neutron',
"net_segment_type": NEUTRON_SEGMENT['tun'],
"propagate_task_deploy": True
}
)