Closed marehler closed 1 month ago
When configuring fabric interfaces, the default descriptions are missing. Sample data:
--- vxlan: topology: switches: - name: N9Kv-SPINE3 <...> interfaces: - name: Ethernet1/3 mode: routed
Resulting configuration:
interface Ethernet1/3 no switchport mtu 9216 no shutdown
Expected configuration:
interface Ethernet1/3 description NetAsCode Routed Interface no switchport mtu 9216 no shutdown
Robot tests fail. Example:
Verify Interface ('N9Kv-SPINE3', 'Ethernet1/3') Traceback (most recent call last): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ File /Users/marehler/nac-vxlan/ansible-dc-vxlan-example/tests/results/config/topology/interfaces.robot:32 T: Verify Interface ('N9Kv-SPINE3', 'Ethernet1/3') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ File /Users/marehler/nac-vxlan/ansible-dc-vxlan-example/tests/results/config/topology/interfaces.robot:306 Should Be Equal As Strings ${api_interface_description} NetAsCode Routed Interface msg=description | ${api_interface_description} = not_defined (str)
Root cause:
In nac_dc_vxlan/roles/dtc/common/templates/ndfc_interface_routed.j2, the default description is not included:
description: {{ interface['description'] | default(omit) }}
Proposed fix:
description: {{ interface['description'] | default(defaults.vxlan.topology.switches.interfaces.topology_switch_routed_interface.description) }}
The same applies to the other interface types.
When configuring fabric interfaces, the default descriptions are missing. Sample data:
Resulting configuration:
Expected configuration:
Robot tests fail. Example:
Root cause:
In nac_dc_vxlan/roles/dtc/common/templates/ndfc_interface_routed.j2, the default description is not included:
Proposed fix:
The same applies to the other interface types.