Skip to content

Commit

Permalink
issue_786 Handling review comments: updated tests.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
VitthalMagadum committed Oct 1, 2024
1 parent 202f508 commit 2545e65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions anta/tests/routing/bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
else:
from typing_extensions import Self

# pylint: disable=C0302
# TODO: Refactor to reduce the number of lines in this module later


def _add_bgp_failures(failures: dict[tuple[str, str | None], dict[str, Any]], afi: Afi, safi: Safi | None, vrf: str, issue: str | dict[str, Any]) -> None:
"""Add a BGP failure entry to the given `failures` dictionary.
Expand Down Expand Up @@ -174,16 +177,16 @@ def _add_bgp_routes_failure(
def _get_inconsistent_peers(peer_details: dict[Any, Any], bgp_peers: list[IPv4Address] | None) -> dict[Any, Any]:
"""Identify BGP peers with inconsistency of prefix(s) received and accepted in a BGP session.
bgp_peers: list of IPv4 address of a BGP peer to be verified. If not provided, test will verifies all the BGP peers.
Parameters
----------
peer_details: The BGP peer data dictionary.
bgp_peers: The list of IPv4 address of a BGP peer(s) to be verified.
peer_details: dict[Any, Any]
The BGP peer data dictionary.
bgp_peers: list[IPv4Address] | None
List of IPv4 address of a BGP peer to be verified. If not provided, test will verifies all the BGP peers.
Returns
-------
dict[Any, Any]: A dictionary containing the BGP peer(s) with inconsistent prefix(s).
dict[Any, Any]: A dictionary containing the BGP peer(s) with inconsistent prefix(s).
"""
failure: dict[Any, Any] = {}
Expand Down
2 changes: 1 addition & 1 deletion examples/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -693,4 +693,4 @@ anta.tests.routing:
- endpoint: 1.0.0.14/32
vias:
- type: ip
nexthop: 1.1.1.1
nexthop: 1.1.1.1

0 comments on commit 2545e65

Please sign in to comment.