File tree Expand file tree Collapse file tree
tests/roles/dataplane_adoption Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ libvirt_password: ''
1313netconfig_networks :
1414 - name : ctlplane
1515 dnsDomain : ctlplane.example.com
16+ mtu : " {{ ctlplane_mtu | default(network_mtu) | default(1500) }}"
1617 subnets :
1718 - name : subnet1
1819 allocationRanges :
@@ -24,6 +25,7 @@ netconfig_networks:
2425 gateway : 192.168.122.1
2526 - name : internalapi
2627 dnsDomain : internalapi.example.com
28+ mtu : " {{ internalapi_mtu | default(network_mtu) | default(1500) }}"
2729 subnets :
2830 - name : subnet1
2931 allocationRanges :
@@ -33,6 +35,7 @@ netconfig_networks:
3335 vlan : 20
3436 - name : External
3537 dnsDomain : external.example.com
38+ mtu : " {{ external_mtu | default(network_mtu) | default(1500) }}"
3639 subnets :
3740 - name : subnet1
3841 allocationRanges :
@@ -43,6 +46,7 @@ netconfig_networks:
4346 vlan : 44
4447 - name : storage
4548 dnsDomain : storage.example.com
49+ mtu : " {{ storage_mtu | default(network_mtu) | default(1500) }}"
4650 subnets :
4751 - name : subnet1
4852 allocationRanges :
@@ -52,6 +56,7 @@ netconfig_networks:
5256 vlan : 21
5357 - name : storagemgmt
5458 dnsDomain : storagemgmt.example.com
59+ mtu : " {{ storagemgmt_mtu | default(network_mtu) | default(1500) }}"
5560 subnets :
5661 - name : subnet1
5762 allocationRanges :
@@ -61,6 +66,7 @@ netconfig_networks:
6166 vlan : 23
6267 - name : tenant
6368 dnsDomain : tenant.example.com
69+ mtu : " {{ tenant_mtu | default(network_mtu) | default(1500) }}"
6470 subnets :
6571 - name : subnet1
6672 allocationRanges :
Original file line number Diff line number Diff line change 2828 file : ospdo.yaml
2929 when : ospdo_src| bool
3030
31+ - name : pre process netconfig_networks for mtu to be an integer
32+ ansible.builtin.set_fact :
33+ netconfig_networks_converted : >-
34+ {% set new_list = [] %}
35+ {% for net in netconfig_networks %}
36+ {% set _ = net.update({'mtu': net.mtu | int}) %}
37+ {% set _ = new_list.append(net) %}
38+ {% endfor %}
39+ {{ new_list }}
40+ when : configure_ipam | bool
41+
3142- name : ensure IPAM is configured
3243 no_log : " {{ use_no_log }}"
3344 ansible.builtin.shell : |
3950 metadata:
4051 name: netconfig
4152 spec:
42- networks: {{ netconfig_networks }}
53+ networks: {{ netconfig_networks_converted }}
4354 EOF
4455 when : configure_ipam | bool
4556
You can’t perform that action at this time.
0 commit comments