Skip to content

Commit a935fe3

Browse files
Merge branch 'main' into feat/issue-1173-bgp
2 parents ae6a005 + 38580b2 commit a935fe3

File tree

6 files changed

+40
-30
lines changed

6 files changed

+40
-30
lines changed

.arista/secret_allowlist.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/secret-scanner.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ repos:
4747
- "<!--| ~| -->"
4848

4949
- repo: https://github.com/astral-sh/ruff-pre-commit
50-
rev: v0.11.5
50+
rev: v0.11.6
5151
hooks:
5252
- id: ruff
5353
name: Run Ruff linter

anta/tests/routing/bgp.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,10 @@ def test(self) -> None:
627627
self.result.is_failure(f"{peer} - Not found")
628628
continue
629629

630-
# Fetching the multiprotocol capabilities
631-
act_mp_caps = get_value(peer_data, "neighborCapabilities.multiprotocolCaps")
630+
# Check if the multiprotocol capabilities are found
631+
if (act_mp_caps := get_value(peer_data, "neighborCapabilities.multiprotocolCaps")) is None:
632+
self.result.is_failure(f"{peer} - Multiprotocol capabilities not found")
633+
continue
632634

633635
# If strict is True, check if only the specified capabilities are configured
634636
if peer.strict and sorted(peer.capabilities) != sorted(act_mp_caps):

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ maintainers = [
1717
{ name = "Carl Baillargeon", email = "carl.baillargeon@arista.com" },
1818
]
1919
description = "Arista Network Test Automation (ANTA) Framework"
20-
license = { file = "LICENSE" }
2120
dependencies = [
2221
"asyncssh>=2.16",
2322
"cvprac>=1.3.1",
@@ -32,8 +31,9 @@ dependencies = [
3231
"typing_extensions>=4.12" # required for deprecated before Python 3.13
3332
]
3433
keywords = ["test", "anta", "Arista", "network", "automation", "networking", "devops", "netdevops"]
34+
license = "Apache-2.0"
35+
license-files = ["LICENSE"]
3536
classifiers = [
36-
"License :: OSI Approved :: Apache Software License",
3737
"Operating System :: OS Independent",
3838
"Development Status :: 5 - Production/Stable",
3939
"Intended Audience :: Developers",

tests/units/anta_tests/routing/test_bgp.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,6 +1945,39 @@ def test_check_bgp_neighbor_capability(input_dict: dict[str, bool], expected: bo
19451945
],
19461946
},
19471947
},
1948+
{
1949+
"name": "failure-capabilities-not-found",
1950+
"test": VerifyBGPPeerMPCaps,
1951+
"eos_data": [
1952+
{
1953+
"vrfs": {
1954+
"default": {
1955+
"peerList": [
1956+
{
1957+
"peerAddress": "172.30.11.1",
1958+
"neighborCapabilities": {},
1959+
}
1960+
]
1961+
},
1962+
}
1963+
}
1964+
],
1965+
"inputs": {
1966+
"bgp_peers": [
1967+
{
1968+
"peer_address": "172.30.11.1",
1969+
"vrf": "default",
1970+
"capabilities": ["ipv4Unicast", "l2-vpn-EVPN"],
1971+
},
1972+
]
1973+
},
1974+
"expected": {
1975+
"result": "failure",
1976+
"messages": [
1977+
"Peer: 172.30.11.1 VRF: default - Multiprotocol capabilities not found",
1978+
],
1979+
},
1980+
},
19481981
{
19491982
"name": "failure-missing-capabilities",
19501983
"test": VerifyBGPPeerMPCaps,

0 commit comments

Comments
 (0)