From 7e9a07212b4710077d63ae031379c1b8d9a69055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 22 Sep 2020 12:50:04 +0200 Subject: [PATCH] Add ctlplane network attrs to Networks resource output Add the attributes of ctlplane network and subnets to the output of the Networks resource. Also, set 'ctlplane_mtu' in group_vars. Follow-up changes will add other ctlplane subnet attributes to group_vars. The ctlplane attributes are added to the plan environment by the depends-on tripleoclient change. Depends-On: https://review.opendev.org/753195 Change-Id: Ic1772b384ad5b2003563b4e3d41a4a2f0e82f8e6 --- network/networks.j2.yaml | 9 ++++++++- overcloud.j2.yaml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/network/networks.j2.yaml b/network/networks.j2.yaml index fcacf8eb2b..d20662443d 100644 --- a/network/networks.j2.yaml +++ b/network/networks.j2.yaml @@ -6,6 +6,13 @@ parameters: CtlplaneNetworkCidrs: type: json description: Cidrs for the ctlplane network. + CtlplaneNetworkAttributes: + type: json + default: {} + description: > + A map containing attributes of the undercloud ctlplane network and + subnets. NOTE: The value for this parameter is automatically populated in + the plan environment by tripleoclient. resources: {%- for network in networks if network.enabled|default(true) %} @@ -20,7 +27,6 @@ resources: NetworkExtraConfig: type: OS::TripleO::Network::ExtraConfig - outputs: net_cidr_map: value: @@ -43,6 +49,7 @@ outputs: {%- endfor %} net_attributes_map: value: + ctlplane: {get_param: CtlplaneNetworkAttributes} {%- for network in networks if network.enabled|default(true) %} {%- set network_name = network.compat_name|default(network.name) %} {{network.name_lower}}: diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index c806997965..30eeffa4de 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -919,6 +919,7 @@ resources: type: OS::Heat::Value properties: value: + ctlplane_mtu: {get_attr: [Networks, net_attributes_map, ctlplane, network, mtu]} {%- for network in networks if network.enabled|default(true) and network.name in role.networks|default([]) %} {{network.name_lower}}_mtu: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, network, mtu]} {%- if role.networks is mapping %}