From a8a1d5b30c12a3cf8f0268216e97b9d2f7568086 Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Mon, 7 Aug 2017 16:04:08 +0200 Subject: Keep dynamic network creation backward compatible. We had an history mapping for InternalApi to InternalNetwork. If we remove it then heat will want to destroy InternalNetwork and create InternalApi which cannot work during upgrade. This adds compat name parameters to network_data.yaml. Closes-Bug: #1709105 Change-Id: I8ce6419a5e13a13ee6e991db5ca2196763f52d7a --- network/networks.j2.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'network') diff --git a/network/networks.j2.yaml b/network/networks.j2.yaml index c790d370..48c509df 100644 --- a/network/networks.j2.yaml +++ b/network/networks.j2.yaml @@ -3,9 +3,9 @@ heat_template_version: pike description: Create networks to split out Overcloud traffic resources: - {%- for network in networks %} - {{network.name}}Network: + {%- set network_name = network.compat_name|default(network.name) %} + {{network_name}}Network: type: OS::TripleO::Network::{{network.name}} {%- endfor %} @@ -19,8 +19,9 @@ outputs: # NOTE(gfidente): we need to replace the null value with a # string to work around https://bugs.launchpad.net/heat/+bug/1700025 {%- for network in networks %} + {%- set network_name = network.compat_name|default(network.name) %} {{network.name_lower}}: yaql: - data: {get_attr: [{{network.name}}Network, subnet_cidr]} + data: {get_attr: [{{network_name}}Network, subnet_cidr]} expression: str($.data).replace('null', 'disabled') {%- endfor %} -- cgit 1.2.3-korg