Merge "Handle mapping multiple heat parameters from one config option"

This commit is contained in:
Zuul 2018-07-18 05:16:55 +00:00 committed by Gerrit Code Review
commit 777debdee7
1 changed files with 10 additions and 1 deletions

View File

@ -56,10 +56,13 @@ INSTACK_NETCONF_MAPPING = {
'SUBNETS_STATIC_ROUTES': 'ControlPlaneStaticRoutes',
}
MULTI_PARAMETER_MAPPING = {
'ipxe_enabled': ['IronicIPXEEnabled', 'IronicInspectorIPXEEnabled']
}
PARAMETER_MAPPING = {
'inspection_interface': 'IronicInspectorInterface',
'undercloud_debug': 'Debug',
'ipxe_enabled': 'IronicInspectorIPXEEnabled',
'certificate_generation_ca': 'CertmongerCA',
'undercloud_public_host': 'CloudName',
'scheduler_max_attempts': 'NovaSchedulerMaxAttempts',
@ -272,6 +275,12 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False,
if param_key in CONF.keys():
env_data[param_value] = CONF[param_key]
# Some undercloud config options need to tweak multiple template parameters
for undercloud_key in MULTI_PARAMETER_MAPPING:
for env_value in MULTI_PARAMETER_MAPPING[undercloud_key]:
if undercloud_key in CONF.keys():
env_data[env_value] = CONF[undercloud_key]
# Set up parameters for undercloud networking
env_data['IronicInspectorSubnets'] = _generate_inspection_subnets()
env_data['ControlPlaneStaticRoutes'] = _generate_subnets_static_routes()