Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(anta): Added the test case for verify BGP peer group of the BGP IPv4 peer(s) #815

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

vitthalmagadum
Copy link
Contributor

Description

Verifies BGP peer group of the BGP IPv4 peer(s).

Expected Results
----------------
* Success: The test will pass if the peer group is correctly assigned to the BGP peer(s).
* Failure: The test will fail if the BGP peer group not correctly assigned or peer is not configured.

Fixes #810

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

Comment on lines 1461 to 1496
peer = command.params.peer
vrf = command.params.vrf
peer_group = input_entry.peer_group
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can collect the peer and vrf from input_entry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

failure_log = f"Expected `{peer_group}` as the configured peer-group, but found `{actual_peer_group}` instead."
if not actual_peer_group:
failure_log = "Peer-group not configured."
failures[peer] = failure_log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so when peer not configured we are giving the vrf information but while it is not correct we are missing it to add vrf information. Please correct it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Thanks!!

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@@ -678,4 +695,4 @@ anta.tests.routing:
- endpoint: 1.0.0.14/32
vias:
- type: ip
nexthop: 1.1.1.1
nexthop: 1.1.1.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the double blank line space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated thanks!!

Copy link

sonarcloud bot commented Oct 1, 2024

Copy link
Contributor

@MaheshGSLAB MaheshGSLAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the pre-commit by disable the line warning issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the test case to verify BGP peer group
2 participants