From 5b576ef0445151f555e4c97907031306ad87a51c Mon Sep 17 00:00:00 2001 From: Guillaume Mulocher Date: Mon, 11 Mar 2024 11:02:58 +0100 Subject: [PATCH] Refactor: Fix typo to render flow-tracking for LAN subif in WAN case (#3729) Co-authored-by: Claus Holbech --- .../cv-pathfinder-edge-no-common-path-group.cfg | 3 +++ .../intended/configs/cv-pathfinder-edge.cfg | 3 +++ .../intended/configs/cv-pathfinder-edge2A.cfg | 6 ++++++ .../intended/configs/cv-pathfinder-edge2B.cfg | 6 ++++++ .../intended/configs/cv-pathfinder-transit1A.cfg | 3 +++ .../intended/configs/cv-pathfinder-transit1B.cfg | 3 +++ .../cv-pathfinder-edge-no-common-path-group.yml | 6 ++++++ .../structured_configs/cv-pathfinder-edge.yml | 6 ++++++ .../structured_configs/cv-pathfinder-edge2A.yml | 12 ++++++++++++ .../structured_configs/cv-pathfinder-edge2B.yml | 12 ++++++++++++ .../structured_configs/cv-pathfinder-transit1A.yml | 6 ++++++ .../structured_configs/cv-pathfinder-transit1B.yml | 6 ++++++ .../python_modules/underlay/ethernet_interfaces.py | 2 +- 13 files changed, 73 insertions(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge-no-common-path-group.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge-no-common-path-group.cfg index 345143646ad..7222b318dfd 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge-no-common-path-group.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge-no-common-path-group.cfg @@ -217,6 +217,7 @@ interface Ethernet52.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.3/31 ! @@ -225,6 +226,7 @@ interface Ethernet52.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.3/31 ! @@ -233,6 +235,7 @@ interface Ethernet52.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.3/31 ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge.cfg index 3dcfd09791f..53433a61fd3 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge.cfg @@ -255,6 +255,7 @@ interface Ethernet52.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.1/31 ! @@ -263,6 +264,7 @@ interface Ethernet52.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.1/31 ! @@ -271,6 +273,7 @@ interface Ethernet52.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.1/31 ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2A.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2A.cfg index 656b1d9843c..e7213049f2d 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2A.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2A.cfg @@ -236,6 +236,7 @@ interface Ethernet52.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.5/31 ! @@ -244,6 +245,7 @@ interface Ethernet52.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.5/31 ! @@ -252,6 +254,7 @@ interface Ethernet52.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.5/31 ! @@ -268,6 +271,7 @@ interface Ethernet53.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.7/31 ! @@ -276,6 +280,7 @@ interface Ethernet53.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.7/31 ! @@ -284,6 +289,7 @@ interface Ethernet53.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.7/31 ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2B.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2B.cfg index dc935ef05e2..341b41ccaf7 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2B.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-edge2B.cfg @@ -235,6 +235,7 @@ interface Ethernet52.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.9/31 ! @@ -243,6 +244,7 @@ interface Ethernet52.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.9/31 ! @@ -251,6 +253,7 @@ interface Ethernet52.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.9/31 ! @@ -267,6 +270,7 @@ interface Ethernet53.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.11/31 ! @@ -275,6 +279,7 @@ interface Ethernet53.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.11/31 ! @@ -283,6 +288,7 @@ interface Ethernet53.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.11/31 ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1A.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1A.cfg index 756272caebd..35c849fd2b3 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1A.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1A.cfg @@ -300,6 +300,7 @@ interface Ethernet52.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.1/31 ! @@ -308,6 +309,7 @@ interface Ethernet52.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.1/31 ! @@ -316,6 +318,7 @@ interface Ethernet52.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.1/31 ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1B.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1B.cfg index 2e536fdc077..87176e511f6 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1B.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit1B.cfg @@ -300,6 +300,7 @@ interface Ethernet52.142 no shutdown mtu 9214 encapsulation dot1q vlan 142 + flow tracker hardware WAN-FLOW-TRACKER vrf PROD ip address 172.17.0.3/31 ! @@ -308,6 +309,7 @@ interface Ethernet52.666 no shutdown mtu 9214 encapsulation dot1q vlan 666 + flow tracker hardware WAN-FLOW-TRACKER vrf ATTRACTED-VRF-FROM-UPLINK ip address 172.17.0.3/31 ! @@ -316,6 +318,7 @@ interface Ethernet52.1000 no shutdown mtu 9214 encapsulation dot1q vlan 1000 + flow tracker hardware WAN-FLOW-TRACKER vrf IT ip address 172.17.0.3/31 ! diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge-no-common-path-group.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge-no-common-path-group.yml index eeb8307f9af..458b69dd73a 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge-no-common-path-group.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge-no-common-path-group.yml @@ -181,6 +181,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.3/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.142 peer: site-ha-disabled-leaf peer_interface: Ethernet2.142 @@ -192,6 +194,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.3/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.666 peer: site-ha-disabled-leaf peer_interface: Ethernet2.666 @@ -203,6 +207,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.3/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet1 peer_type: l3_interface ip_address: dhcp diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge.yml index 8b52a8efc7a..7dcc35891cf 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge.yml @@ -191,6 +191,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.1/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.142 peer: site-ha-disabled-leaf peer_interface: Ethernet1.142 @@ -202,6 +204,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.1/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.666 peer: site-ha-disabled-leaf peer_interface: Ethernet1.666 @@ -213,6 +217,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.1/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet1 peer_type: l3_interface peer: peer3 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2A.yml index c4c2a4b513e..c0eddfbd5ef 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2A.yml @@ -209,6 +209,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.5/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.142 peer: site-ha-enabled-leaf2A peer_interface: Ethernet1.142 @@ -220,6 +222,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.5/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.666 peer: site-ha-enabled-leaf2A peer_interface: Ethernet1.666 @@ -231,6 +235,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.5/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet53 peer: site-ha-enabled-leaf2B peer_interface: Ethernet1 @@ -253,6 +259,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.7/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet53.142 peer: site-ha-enabled-leaf2B peer_interface: Ethernet1.142 @@ -264,6 +272,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.7/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet53.666 peer: site-ha-enabled-leaf2B peer_interface: Ethernet1.666 @@ -275,6 +285,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.7/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet1 peer_type: l3_interface ip_address: dhcp diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2B.yml index 9b91e814495..42e8fa0541b 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-edge2B.yml @@ -209,6 +209,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.9/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.142 peer: site-ha-enabled-leaf2A peer_interface: Ethernet2.142 @@ -220,6 +222,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.9/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.666 peer: site-ha-enabled-leaf2A peer_interface: Ethernet2.666 @@ -231,6 +235,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.9/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet53 peer: site-ha-enabled-leaf2B peer_interface: Ethernet2 @@ -253,6 +259,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.11/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet53.142 peer: site-ha-enabled-leaf2B peer_interface: Ethernet2.142 @@ -264,6 +272,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.11/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet53.666 peer: site-ha-enabled-leaf2B peer_interface: Ethernet2.666 @@ -275,6 +285,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.11/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet2 peer_type: l3_interface ip_address: 172.15.6.6/31 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml index 53f85c63f09..60675e3301e 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1A.yml @@ -216,6 +216,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.1/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.142 peer: site-ha-enabled-leaf1 peer_interface: Ethernet1.142 @@ -227,6 +229,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.1/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.666 peer: site-ha-enabled-leaf1 peer_interface: Ethernet1.666 @@ -238,6 +242,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.1/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet1.42 peer_type: l3_interface ip_address: dhcp diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml index 9a1fb0db109..95ddc31e846 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit1B.yml @@ -216,6 +216,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 1000 mtu: 9214 ip_address: 172.17.0.3/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.142 peer: site-ha-enabled-leaf1 peer_interface: Ethernet2.142 @@ -227,6 +229,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 142 mtu: 9214 ip_address: 172.17.0.3/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet52.666 peer: site-ha-enabled-leaf1 peer_interface: Ethernet2.666 @@ -238,6 +242,8 @@ ethernet_interfaces: encapsulation_dot1q_vlan: 666 mtu: 9214 ip_address: 172.17.0.3/31 + flow_tracker: + hardware: WAN-FLOW-TRACKER - name: Ethernet1.42 peer_type: l3_interface ip_address: dhcp diff --git a/ansible_collections/arista/avd/roles/eos_designs/python_modules/underlay/ethernet_interfaces.py b/ansible_collections/arista/avd/roles/eos_designs/python_modules/underlay/ethernet_interfaces.py index 210edfd894b..97166caa6f0 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/python_modules/underlay/ethernet_interfaces.py +++ b/ansible_collections/arista/avd/roles/eos_designs/python_modules/underlay/ethernet_interfaces.py @@ -194,7 +194,7 @@ def ethernet_interfaces(self) -> list | None: # Configuring flow tracking on LAN interfaces if self.shared_utils.is_cv_pathfinder_client: - ethernet_interface["flow_tracker"] = {"hardware": self.shared_utils.wan_flow_tracker_name} + ethernet_subinterface["flow_tracker"] = {"hardware": self.shared_utils.wan_flow_tracker_name} ethernet_subinterface = {key: value for key, value in ethernet_subinterface.items() if value is not None} append_if_not_duplicate(