File tree Expand file tree Collapse file tree
roles/dtc/common/templates/ndfc_networks/mcfg_fabric Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44{% else %}
55{% set networks = [] %}
66{% endif %}
7+ {% set net_overrides = {} %}
8+ {% for _n in runtime_mcfg_data_model .overlay_attach_groups .networks | default ([], true ) %}
9+ {% set _ = net_overrides .update ({_n ['name' ]: _n .get ('switch_attach_overrides' ) or []}) %}
10+ {% endfor %}
711{% for net in networks %}
812- net_name: {{ net['name'] }}
913{# ------------------------------------------------------ #}
7478{% endif %}
7579{% for attach in network_attach_groups_dict [net ['network_attach_group' ]] %}
7680 - ip_address: {{ attach['mgmt_ip_address'] }}
81+ {% for switch_override in net_overrides .get (net ['name' ], []) %}
82+ {% if switch_override ['mgmt_ip_address' ] == attach ['mgmt_ip_address' ] %}
83+ {% if switch_override ['vlan_id' ] is defined and switch_override ['vlan_id' ] != net ['vlan_id' ] %}
84+ vlan_id: {{ switch_override['vlan_id'] }}
85+ {% endif %}
86+ {% if switch_override ['freeform_config' ] is defined %}
87+ freeform_config: |-
88+ {{ switch_override['freeform_config'] | cisco.nac_dc_vxlan.dedent | indent(8, true) }}
89+ {% endif %}
90+ {% if ndfc_version | cisco .nac_dc_vxlan .version_compare ('12.4.1' , '>=' ) %}
91+ svi_enabled: {{ switch_override['svi_enabled'] | default(defaults.vxlan.overlay.networks.svi_enabled) }}
92+ {% endif %}
93+ {% endif %}
94+ {% endfor %}
7795{% if attach ['ports' ] is defined %}
7896 ports: {{ attach['ports'] }}
7997{% endif %}
You can’t perform that action at this time.
0 commit comments