Skip to content

Commit

Permalink
Fix(eos_designs): Support of validate_lldp key in structured config (#…
Browse files Browse the repository at this point in the history
…4777)

Co-authored-by: Claus Holbech <[email protected]>
  • Loading branch information
bjmeuer and ClausHolbechArista authored Dec 10, 2024
1 parent 069f251 commit 44d1572
Show file tree
Hide file tree
Showing 8 changed files with 5,145 additions and 5,099 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,19 @@ ethernet_interfaces:
mode: access
access_vlan: 11
spanning_tree_portfast: edge
- name: Ethernet33
peer: dc1-leaf1-workstationNoLLDP
peer_interface: e1
peer_type: workstation
port_profile: Workstations_NoLLDP
description: WORKSTATION_dc1-leaf1-workstationNoLLDP_e1
shutdown: false
validate_lldp: false
switchport:
enabled: true
mode: access
access_vlan: 11
spanning_tree_portfast: edge
mlag_configuration:
domain_id: DC1_L3_LEAF1
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ anta.tests.interfaces:
status: up
result_overwrite:
custom_field: Interface Ethernet5 - SERVER_dc1-leaf1-server1_PCI1 = 'up'
- VerifyInterfacesStatus:
interfaces:
- name: Ethernet33
status: up
result_overwrite:
custom_field: Interface Ethernet33 - WORKSTATION_dc1-leaf1-workstationNoLLDP_e1
= 'up'
- VerifyInterfacesStatus:
interfaces:
- name: Port-Channel3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ port_profiles:
spanning_tree_portfast: edge
validate_state: false

- profile: Workstations_NoLLDP
mode: access
vlans: 11
spanning_tree_portfast: edge
validate_lldp: false

# Definition of connected endpoints in the fabric.
servers:
# Name of the defined server.
Expand Down Expand Up @@ -132,6 +138,13 @@ workstations:
switch_ports: [ Ethernet32 ]
switches: [ dc1-leaf1a ]

- name: dc1-leaf1-workstationNoLLDP
adapters:
- profile: Workstations_NoLLDP
endpoint_ports: [ e1 ]
switch_ports: [ Ethernet33]
switches: [ dc1-leaf1a ]

# These ports will not be validated
network_ports:
- switches: [ dc1-leaf1b ]
Expand Down
5,097 changes: 2,549 additions & 2,548 deletions ansible_collections/arista/avd/molecule/eos_validate_state/reports/FABRIC-state.csv

Large diffs are not rendered by default.

5,103 changes: 2,552 additions & 2,551 deletions ansible_collections/arista/avd/molecule/eos_validate_state/reports/FABRIC-state.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,15 @@
"description": "Verifies the status of the provided interfaces.",
"custom_field": "Interface Ethernet3 - MLAG_dc1-leaf1b_Ethernet3 = 'up'"
},
{
"name": "dc1-leaf1a",
"test": "VerifyInterfacesStatus",
"categories": [
"interfaces"
],
"description": "Verifies the status of the provided interfaces.",
"custom_field": "Interface Ethernet33 - WORKSTATION_dc1-leaf1-workstationNoLLDP_e1 = 'up'"
},
{
"name": "dc1-leaf1a",
"test": "VerifyInterfacesStatus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def _get_ethernet_interface_cfg(
"speed": adapter.speed,
"shutdown": not (adapter.enabled if adapter.enabled is not None else True),
"validate_state": None if (adapter.validate_state if adapter.validate_state is not None else True) else False,
"validate_lldp": None if (adapter.validate_lldp if adapter.validate_lldp is not None else True) else False,
"dot1x": adapter.dot1x._as_dict() or None,
"poe": self._get_adapter_poe(adapter),
"eos_cli": adapter.raw_eos_cli,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def _get_port_channel_interface_cfg(
"sflow": self._get_adapter_sflow(adapter),
"flow_tracker": self.shared_utils.get_flow_tracker(adapter.flow_tracking),
"validate_state": None if (adapter.validate_state if adapter.validate_state is not None else True) else False,
"validate_lldp": None if (adapter.validate_lldp if adapter.validate_lldp is not None else True) else False,
"eos_cli": adapter.port_channel.raw_eos_cli,
"struct_cfg": adapter.port_channel.structured_config._as_dict(strip_values=()) or None,
}
Expand Down

0 comments on commit 44d1572

Please sign in to comment.