Skip to content

Commit e65906b

Browse files
eduolivaresevallesp
authored andcommitted
[ci_gen_kustomize_values][BGP] Skip netconfig for networks without it
This change is necessary for the cleanup of networks that are not really used with BGP. As part of the cleanup, netconfig entries are removed and they should not be included in the EDPM allocationRanges. OSPRH-26038 Signed-off-by: Eduardo Olivares <eolivare@redhat.com>
1 parent f56ee18 commit e65906b

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ data:
6161
{% set _ = ns.lb_tools.update({tool: []}) %}
6262
{% endif %}
6363
{% endfor %}
64-
{% if network.network_name != 'ctlplane' %}
64+
{% if network.network_name != 'ctlplane' and network.tools.netconfig is defined %}
6565
- allocationRanges:
6666
{% for range in network.tools.netconfig.ipv4_ranges %}
6767
- end: {{ range.end }}
@@ -75,7 +75,7 @@ data:
7575
{% if network.vlan_id is defined %}
7676
vlan: {{ network.vlan_id }}
7777
{% endif %}
78-
{% else %}
78+
{% elif network.network_name == 'ctlplane' %}
7979
{% for rack in ['r0', 'r1', 'r2'] %}
8080
{% set rack_subnet = cifmw_networking_env_definition.networks[network.network_name + rack] %}
8181
- allocationRanges:

roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ data:
6767
{% set _ = ns.lb_tools.update({tool: []}) %}
6868
{% endif %}
6969
{% endfor %}
70-
{% if network.network_name != 'ctlplane' %}
70+
{% if network.network_name != 'ctlplane' and network.tools.netconfig is defined %}
7171
- allocationRanges:
7272
{% for range in network.tools.netconfig.ipv4_ranges %}
7373
- end: {{ range.end }}
@@ -81,7 +81,7 @@ data:
8181
{% if network.vlan_id is defined %}
8282
vlan: {{ network.vlan_id }}
8383
{% endif %}
84-
{% else %}
84+
{% elif network.network_name == 'ctlplane' %}
8585
{% for rack in ['r0', 'r1', 'r2'] %}
8686
{% set rack_subnet = cifmw_networking_env_definition.networks[network.network_name + rack] %}
8787
- allocationRanges:

roles/ci_gen_kustomize_values/templates/bgp_dt04_ipv6/network-values/values.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data:
6262
{% set _ = ns.lb_tools.update({tool: []}) %}
6363
{% endif %}
6464
{% endfor %}
65-
{% if network.network_name != 'ctlplane' %}
65+
{% if network.network_name != 'ctlplane' and network.tools.netconfig is defined %}
6666
- allocationRanges:
6767
{% for range in network.tools.netconfig.ipv6_ranges %}
6868
- end: {{ range.end }}
@@ -76,7 +76,7 @@ data:
7676
{% if network.vlan_id is defined %}
7777
vlan: {{ network.vlan_id }}
7878
{% endif %}
79-
{% else %}
79+
{% elif network.network_name == 'ctlplane' %}
8080
{% for rack in ['r0', 'r1', 'r2'] %}
8181
{% set rack_subnet = cifmw_networking_env_definition.networks[network.network_name + rack] %}
8282
- allocationRanges:

0 commit comments

Comments
 (0)