Remove unused params in jinja rendered network config templates
Since change I07822ec0cba7eed352c0010eb893b5e5a522e95c removed the noop resources only parameters for networks used by the role is passed to the network config templates. Add a conditional when iterating over networks in jinja templates so that only parameters for networks used by the role is included. Change-Id: I8b6c7d247d719a7c8559c4be5e35c478a0f189f7 Related-Bug: #1800811
This commit is contained in:
parent
c4b816e8c5
commit
2f84e6e951
network/config
bond-with-vlans
multiple-nics
single-nic-linux-bridge-vlans
single-nic-vlans
@ -25,7 +25,7 @@ parameters:
|
||||
Unless the default is changed, the parameter is automatically resolved
|
||||
from the subnet host_routes attribute.
|
||||
type: json
|
||||
{% for network in networks %}
|
||||
{% for network in networks if network.enabled|default(true) and network.name in role.networks %}
|
||||
{{network.name}}IpSubnet:
|
||||
default: ''
|
||||
description: IP address/subnet on the {{network.name_lower}} network
|
||||
|
@ -25,7 +25,7 @@ parameters:
|
||||
Unless the default is changed, the parameter is automatically resolved
|
||||
from the subnet host_routes attribute.
|
||||
type: json
|
||||
{% for network in networks %}
|
||||
{% for network in networks if network.enabled|default(true) and network.name in role.networks %}
|
||||
{{network.name}}IpSubnet:
|
||||
default: ''
|
||||
description: IP address/subnet on the {{network.name_lower}} network
|
||||
|
@ -25,7 +25,7 @@ parameters:
|
||||
Unless the default is changed, the parameter is automatically resolved
|
||||
from the subnet host_routes attribute.
|
||||
type: json
|
||||
{% for network in networks %}
|
||||
{% for network in networks if network.enabled|default(true) and network.name in role.networks %}
|
||||
{{network.name}}IpSubnet:
|
||||
default: ''
|
||||
description: IP address/subnet on the {{network.name_lower}} network
|
||||
|
@ -25,7 +25,7 @@ parameters:
|
||||
Unless the default is changed, the parameter is automatically resolved
|
||||
from the subnet host_routes attribute.
|
||||
type: json
|
||||
{% for network in networks %}
|
||||
{% for network in networks if network.enabled|default(true) and network.name in role.networks %}
|
||||
{{network.name}}IpSubnet:
|
||||
default: ''
|
||||
description: IP address/subnet on the {{network.name_lower}} network
|
||||
|
Loading…
x
Reference in New Issue
Block a user