diff options
author | Steven Hardy <shardy@redhat.com> | 2017-07-11 14:37:36 +0100 |
---|---|---|
committer | Dan Sneddon <dsneddon@redhat.com> | 2017-07-13 20:42:11 +0000 |
commit | 303e192c898746f41bcc5dcd3a061024e222d7d5 (patch) | |
tree | b2ad8b8b1494b9d4cc8e5323e0a93a87fbca7fac | |
parent | b108289aa610b7d378d4461d942698eda35b4f31 (diff) |
Support deprecated controllerExtraConfig naming in role template
To enable backwards compatibility with rendering the controler-role
template add this deprecated parameter for all roles - we should
remove this in a future release after the tripleoclient warnings re
deprecated parameters are available.
Change-Id: Icce93a4109191609848ca216c946a32663753b93
-rw-r--r-- | puppet/role.role.j2.yaml | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml index 039bd6ba..85520fc0 100644 --- a/puppet/role.role.j2.yaml +++ b/puppet/role.role.j2.yaml @@ -1,3 +1,9 @@ +{# ## Some variables are set to enable rendering backwards compatible templates #} +{# ## where a few parameter/resource names don't match the expected pattern #} +{# ## FIXME: we need some way to deprecate the old inconsistent parameters #} +{%- if role.name == 'Controller' -%} + {%- set deprecated_extraconfig_param = 'controllerExtraConfig' -%} +{% endif %} heat_template_version: pike description: 'OpenStack {{role.name}} node configured by Puppet' parameters: @@ -70,6 +76,13 @@ parameters: description: | Role specific additional hiera configuration to inject into the cluster. type: json +{%- if deprecated_extraconfig_param is defined %} + {{deprecated_extraconfig_param}}: + default: {} + description: | + DEPRECATED use {{role.name}}ExtraConfig instead + type: json +{%- endif %} {{role.name}}IPs: default: {} type: json @@ -189,6 +202,14 @@ parameters: object: 0 default: {} +{% if deprecated_extraconfig_param is defined %} +parameter_groups: +- label: deprecated + description: Do not use deprecated params, they will be removed. + parameters: + - {{deprecated_extraconfig_param}} +{%- endif %} + conditions: server_not_blacklisted: not: @@ -474,7 +495,12 @@ resources: map_replace: - {get_param: ServiceConfigSettings} - values: {get_attr: [NetIpMap, net_ip_map]} - {{role.name.lower()}}_extraconfig: {get_param: {{role.name}}ExtraConfig} + {{role.name.lower()}}_extraconfig: + map_merge: +{%- if deprecated_extraconfig_param is defined %} + - {get_param: {{deprecated_extraconfig_param}}} +{%- endif %} + - {get_param: {{role.name}}ExtraConfig} extraconfig: {get_param: ExtraConfig} {{role.name.lower()}}: tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade} |