Merge "Add ctlplane network attrs to Networks resource output"

This commit is contained in:
Zuul 2020-09-29 00:57:23 +00:00 committed by Gerrit Code Review
commit 8d8af8f6ee
2 changed files with 9 additions and 1 deletions

View File

@ -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}}:

View File

@ -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 %}