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)
This commit is contained in:
Mathieu Bultel 2018-03-21 11:43:32 +01:00 committed by Sergii Golovatiuk
parent c5d9522343
commit da28a085bb
2 changed files with 4 additions and 0 deletions

View File

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

View File

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