Browse Source

Do not create NetworkVlanID is the value is not defined

In case of Upgrade, the {{role}}NetworkVlanID is not defined
in network_data.yaml in Pike.
So when the jinja template generate the network_data.yaml
the parameter_defaults for the NetworkVlanID result to
empty parameters.
If no VlanID has been provided by user environment files,
then we need to used the default defined in network/config/

Change-Id: If119f3900eb60a217b8209d59fb9bc900107addb
(cherry picked from commit ddc7192999)
changes/66/558766/1
Mathieu Bultel 3 years ago
committed by Sergii Golovatiuk
parent
commit
da28a085bb
  1. 2
      environments/network-environment-v6.j2.yaml
  2. 2
      environments/network-environment.j2.yaml

2
environments/network-environment-v6.j2.yaml

@ -32,7 +32,9 @@ parameter_defaults:
{%- endfor %}
# Customize the VLAN IDs to match the local environment
{%- for network in networks if network.enabled|default(true) %}
{%- if network.vlan is defined %}
{{network.name}}NetworkVlanID: {{network.vlan}}
{%- endif %}
{%- endfor %}
# Customize the IP ranges on each network to use for static IPs and VIPs
{%- for network in networks if network.enabled|default(true) %}

2
environments/network-environment.j2.yaml

@ -27,7 +27,9 @@ parameter_defaults:
{%- endfor %}
# Customize the VLAN IDs to match the local environment
{%- for network in networks if network.enabled|default(true) %}
{%- if network.vlan is defined %}
{{network.name}}NetworkVlanID: {{network.vlan}}
{%- endif %}
{%- endfor %}
{%- for network in networks if network.enabled|default(true) %}
{%- if network.name == 'External' %}

Loading…
Cancel
Save