Remove uneececary conditionals in network-environment jinja

In the environment/network-environment*.yaml files the
itaration is done only on networks that is enabled.

We do not need conditionals inside the loop to check
wheather the network is enabled or not.

Change-Id: I621c205aebcdb353ac487a5804bbe83fbc20c95d
This commit is contained in:
Harald Jensås 2018-08-22 10:38:33 +02:00
parent dc6c632681
commit b4c9766bee
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ parameter_defaults:
# Customize the IP range to use for static IPs and VIPs
{{network.name}}AllocationPools: {{network.allocation_pools}}
{%- endif %}
{%- if network.enabled|default(true) and network.gateway_ipv6|default(false) %}
{%- if network.gateway_ipv6|default(false) %}
# Gateway router for routable networks
{{network.name}}InterfaceDefaultRoute: '{{network.gateway_ipv6}}'
{%- endif %}
@ -52,7 +52,7 @@ parameter_defaults:
# Customize the VLAN ID to match the local environment
{{network.name}}NetworkVlanID: {{network.vlan}}
{%- endif %}
{%- if network.enabled|default(true) and network.routes_ipv6 %}
{%- if network.routes_ipv6 %}
# Routes to add to host_routes property of the subnets in neutron.
{{network.name}}Routes: {{network.routes_ipv6|default([])}}
{%- endif %}

View File

@ -50,7 +50,7 @@ parameter_defaults:
# Customize the VLAN ID to match the local environment
{{network.name}}NetworkVlanID: {{network.vlan}}
{%- endif %}
{%- if network.enabled|default(true) and network.routes %}
{%- if network.routes %}
# Routes to add to host_routes property of the subnets in neutron.
{{network.name}}Routes: {{network.routes|default([])}}
{%- endif %}