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 to verify the BGP route origin #813

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

Conversation

vitthalmagadum
Copy link
Collaborator

Description

Verifies BGP route origin for the provided IPv4 Network(s).

Expected Results
----------------
* Success: The test will pass if the BGP route's origin matches expected origin type.
* Failure: The test will fail if the BGP route's origin does not matches with expected origin type or BGP route entry(s) not found.

Fixes #811

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)

anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
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.

anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
examples/tests.yaml Outdated Show resolved Hide resolved
@vitthalmagadum
Copy link
Collaborator Author

Added pylint disable for no of line check (C0302) with TODO.
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.

Copy link

codspeed-hq bot commented Oct 1, 2024

CodSpeed Performance Report

Merging #813 will not alter performance

Comparing vitthalmagadum:issue_811 (15d5964) with main (387c281)

Summary

✅ 8 untouched benchmarks

Comment on lines 1680 to 1683
route_paths: list[dict[str, IPv4Address | Literal["Igp", "Egp", "Incomplete"]]]
"""A list of dictionaries represents a BGP path.
- `nexthop`: The next-hop IP address for the path.
- `origin`: The origin of the route."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

could this be modeled properly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated input model for BGP route paths.
Thanks!!

Copy link
Collaborator

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

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

cf question about model

@vitthalmagadum vitthalmagadum requested a review from gmuloc October 11, 2024 03:40
Copy link

sonarcloud bot commented Oct 11, 2024

Copy link
Contributor

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

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

Successfully merging this pull request may close these issues.

Add test case to verify the BGP route origin.
3 participants