diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-L2LEAF1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-L2LEAF1A.yml index 8ca90979f48..699374f7eb2 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-L2LEAF1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-L2LEAF1A.yml @@ -105,7 +105,8 @@ ethernet_interfaces: switchport: enabled: true link_tracking_groups: - - name: l2leaf-server02 + names: + - l2leaf-server02 direction: downstream port_channel_interfaces: - name: Port-Channel1 @@ -117,7 +118,8 @@ port_channel_interfaces: allowed_vlan: '310' shutdown: false link_tracking_groups: - - name: l2leaf-server02 + names: + - l2leaf-server02 direction: upstream vlans: - id: 310 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1A.yml index 14e1182cd7c..b8006dfab3b 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1A.yml @@ -181,7 +181,8 @@ ethernet_interfaces: switchport: enabled: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: upstream ip_address: 10.10.101.1/31 - name: Ethernet10 @@ -436,7 +437,8 @@ port_channel_interfaces: description: server01_ES1_PortChanne1 shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true @@ -450,7 +452,8 @@ port_channel_interfaces: description: server03_AUTO_ESI_Auto-ESI PortChannel shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true @@ -464,7 +467,8 @@ port_channel_interfaces: description: server04_AUTO_ESI_Profile_Auto-ESI PortChannel from profile shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true @@ -478,7 +482,8 @@ port_channel_interfaces: description: server05_AUTO_ESI_Profile_Override_Auto-ESI PortChannel overridden on server shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1B.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1B.yml index c1779d969dc..58cd2cafe3b 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1B.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF1B.yml @@ -181,7 +181,8 @@ ethernet_interfaces: switchport: enabled: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: upstream ip_address: 10.10.101.3/31 - name: Ethernet10 @@ -436,7 +437,8 @@ port_channel_interfaces: description: server01_ES1_PortChanne1 shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true @@ -450,7 +452,8 @@ port_channel_interfaces: description: server03_AUTO_ESI_Auto-ESI PortChannel shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true @@ -464,7 +467,8 @@ port_channel_interfaces: description: server04_AUTO_ESI_Profile_Auto-ESI PortChannel from profile shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true @@ -478,7 +482,8 @@ port_channel_interfaces: description: server05_AUTO_ESI_Profile_Override_Auto-ESI PortChannel overridden on server shutdown: false link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream switchport: enabled: true diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF2A.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF2A.yml index bcbc75d63be..777ca823daf 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF2A.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/MH-LEAF2A.yml @@ -207,7 +207,8 @@ ethernet_interfaces: switchport: enabled: false link_tracking_groups: - - name: Eth-conn-to-router + names: + - Eth-conn-to-router direction: upstream ip_address: 10.10.101.5/31 - name: Ethernet2 @@ -231,7 +232,8 @@ ethernet_interfaces: mode: access access_vlan: '310' link_tracking_groups: - - name: Eth-conn-to-router + names: + - Eth-conn-to-router direction: downstream port_channel_interfaces: - name: Port-Channel2 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/connected_endpoints.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/connected_endpoints.yml index 20e8843b5bc..4451c515ae5 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/connected_endpoints.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/connected_endpoints.yml @@ -236,7 +236,8 @@ ethernet_interfaces: phone: vlan: 321 link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream - name: Ethernet16 peer: INDIVIDUAL_2_TRUNK_PHONE @@ -254,7 +255,8 @@ ethernet_interfaces: phone: vlan: 321 link_tracking_groups: - - name: LT_GROUP1 + names: + - LT_GROUP1 direction: downstream port_channel_interfaces: - name: Port-Channel1 diff --git a/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py b/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py index 410f0f5fe63..19cb0b1591d 100644 --- a/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py +++ b/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py @@ -205,7 +205,11 @@ def _get_p2p_uplink(self: EosDesignsFacts, uplink_index: int, uplink_interface: uplink["peer_ip_address"] = self.shared_utils.ip_addressing.p2p_uplinks_peer_ip(uplink_index) if self.shared_utils.link_tracking_groups is not None: - uplink["link_tracking_groups"] = [{"name": lt_group["name"], "direction": "upstream"} for lt_group in self.shared_utils.link_tracking_groups] + uplink["link_tracking_groups"] = { + "names": [lt_group["name"] for lt_group in self.shared_utils.link_tracking_groups], + "direction": "upstream", + } + if self.shared_utils.uplink_structured_config is not None: uplink["structured_config"] = self.shared_utils.uplink_structured_config @@ -291,7 +295,10 @@ def _get_l2_uplink( uplink["peer_short_esi"] = self._short_esi if self.shared_utils.link_tracking_groups is not None: - uplink["link_tracking_groups"] = [{"name": lt_group["name"], "direction": "upstream"} for lt_group in self.shared_utils.link_tracking_groups] + uplink["link_tracking_groups"] = { + "names": [lt_group["name"] for lt_group in self.shared_utils.link_tracking_groups], + "direction": "upstream", + } if not self.shared_utils.network_services_l2: # This child device does not support VLANs, so we tell the peer to enable portfast diff --git a/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py b/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py index 06aaa2487de..5fbf4aa725b 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py +++ b/python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/utils.py @@ -192,12 +192,10 @@ def _get_adapter_link_tracking_groups(self: AvdStructuredConfigConnectedEndpoint if self.shared_utils.link_tracking_groups is None or get(adapter, "link_tracking.enabled") is not True: return None - return [ - { - "name": get(adapter, "link_tracking.name", default=self.shared_utils.link_tracking_groups[0]["name"]), - "direction": "downstream", - }, - ] + return { + "names": [get(adapter, "link_tracking.name", default=self.shared_utils.link_tracking_groups[0]["name"])], + "direction": "downstream", + } def _get_adapter_ptp(self: AvdStructuredConfigConnectedEndpoints, adapter: dict) -> dict | None: """Return ptp for one adapter."""