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
This commit is contained in:
Mathieu Bultel 2018-03-21 11:43:32 +01:00
parent 9bd6732bd6
commit ddc7192999
2 changed files with 4 additions and 0 deletions

View File

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

View File

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