Skip to content

Commit

Permalink
Feat(eos_validate_state): Added the support of validate_lldp key to…
Browse files Browse the repository at this point in the history
… skip the VerifyLLDPNeighbors tests (#4684)
  • Loading branch information
MaheshGSLAB authored Nov 12, 2024
1 parent afcc4a7 commit adc3dd2
Show file tree
Hide file tree
Showing 17 changed files with 1,033 additions and 1,001 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ ethernet_interfaces:
channel_group:
id: 3
mode: active
validate_lldp: false
- name: Ethernet1
peer: dc2-spine1
peer_interface: Ethernet5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ anta.tests.configuration:
- VerifyZeroTouch: null
- VerifyRunningConfigDiffs: null
anta.tests.connectivity:
- VerifyLLDPNeighbors:
neighbors:
- neighbor_device: dc2-leaf3b.arista.com
neighbor_port: Ethernet4
port: Ethernet4
result_overwrite:
custom_field: 'Local: Ethernet4 - Remote: dc2-leaf3b.arista.com Ethernet4'
- VerifyLLDPNeighbors:
neighbors:
- neighbor_device: dc2-spine1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ custom_structured_configuration_ethernet_interfaces:
- name: Ethernet3
validate_state: false

# Test to skip the VerifyLLDPNeighbors testcase via `validate_lldp` key
- name: Ethernet4
validate_lldp: false

custom_structured_configuration_port_channel_interfaces:
- name: Port-Channel11
description: dc2-leaf3-fw1_PortChannel
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@
"description": "Verifies that the provided LLDP neighbors are connected properly.",
"custom_field": "Local: Ethernet2 - Remote: dc2-spine2 Ethernet5"
},
{
"name": "dc2-leaf3a.arista.com",
"test": "VerifyLLDPNeighbors",
"categories": [
"connectivity"
],
"description": "Verifies that the provided LLDP neighbors are connected properly.",
"custom_field": "Local: Ethernet4 - Remote: dc2-leaf3b.arista.com Ethernet4"
},
{
"name": "dc2-leaf3a.arista.com",
"test": "VerifyReachability",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ def test_definition(self) -> dict | None:
LOGGER.info("Interface '%s' variable 'validate_state' is set to False. %s is skipped.", interface["name"], self.__class__.__name__)
continue

if interface.get("validate_lldp", True) is False:
LOGGER.info("Interface '%s' variable 'validate_lldp' is set to False. %s is skipped.", interface["name"], self.__class__.__name__)
continue

if self.is_subinterface(interface):
LOGGER.info("Interface '%s' is a subinterface. %s is skipped.", interface["name"], self.__class__.__name__)
continue
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,9 @@ keys:
validate_state:
type: bool
description: Set to false to disable interface state and LLDP topology validation performed by the `eos_validate_state` role.
validate_lldp:
type: bool
description: Set to false to disable the LLDP topology validation performed by the `eos_validate_state` role.
switchport:
type: dict
description: This should not be combined with `ethernet_interfaces[].type = switched/routed`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,9 @@ keys:
validate_state:
type: bool
description: Set to false to disable interface state and LLDP topology validation performed by the `eos_validate_state` role.
validate_lldp:
type: bool
description: Set to false to disable the LLDP topology validation performed by the `eos_validate_state` role.
eos_cli:
type: str
description: Multiline EOS CLI rendered directly on the port-channel interface in the final EOS configuration.
Expand Down
4 changes: 4 additions & 0 deletions python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ $defs:
validate_state:
type: bool
description: Set to false to disable interface state and LLDP topology validation performed by the `eos_validate_state` role.
validate_lldp:
type: bool
description: Set to false to disable the LLDP topology validation performed by the `eos_validate_state` role.
raw_eos_cli:
type: str
description: EOS CLI rendered directly on the ethernet interface in the final EOS configuration.
Expand Down

0 comments on commit adc3dd2

Please sign in to comment.