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 testcase to verify the BGP Redistributed Routes #993

Conversation

geetanjalimanegslab
Copy link
Collaborator

@geetanjalimanegslab geetanjalimanegslab commented Jan 7, 2025

Description

Added testcase to verify the BGP Redistributed Routes

  This test performs the following checks for each specified route:

  1. Ensures that the expected address-family is configured on the device.
  2. Confirms that the redistributed route protocol and route map match the expected values for a route.
     
 Expected Results
----------------
* Success: If all of the following conditions are met:
    - The expected address-family is configured on the device.
    - The redistributed route protocol and route map align with the expected values for the route.
* Failure: If any of the following occur:
    - The expected address-family is not configured on device.
    - The redistributed route protocol or route map does not match the expected value for a route.

Fixes #1009

Note - Added pylint disable for number of line check (C0302) with TODO.

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)

@geetanjalimanegslab geetanjalimanegslab changed the title Added testcase to verify the BGP Redistributed Routes feat(anta):Added testcase to verify the BGP Redistributed Routes Jan 7, 2025
@geetanjalimanegslab geetanjalimanegslab changed the title feat(anta):Added testcase to verify the BGP Redistributed Routes feat(anta): Added testcase to verify the BGP Redistributed Routes Jan 7, 2025
Copy link

codspeed-hq bot commented Jan 7, 2025

CodSpeed Performance Report

Merging #993 will not alter performance

Comparing geetanjalimanegslab:test_bgp_redistributed_routes (0d51312) with main (b652ed1)

Summary

✅ 22 untouched benchmarks

anta/custom_types.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
@vitthalmagadum vitthalmagadum marked this pull request as ready for review January 14, 2025 08:55
Copy link
Contributor

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

@geetanjalimanegslab geetanjalimanegslab force-pushed the test_bgp_redistributed_routes branch from 16ed8ec to 145dae6 Compare January 15, 2025 07:15
Copy link
Contributor

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

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
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

Please update the test with the suggested input models.

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

@gmuloc gmuloc removed the on-hold Waiting for additional elements label Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 6, 2025

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

anta/custom_types.py Outdated Show resolved Hide resolved
anta/custom_types.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
Copy link
Contributor

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

@geetanjalimanegslab geetanjalimanegslab force-pushed the test_bgp_redistributed_routes branch from 9b123e1 to 0b95bfe Compare February 10, 2025 11:54
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/input_models/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/tests/routing/bgp.py Outdated Show resolved Hide resolved
anta/custom_types.py Show resolved Hide resolved
Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

LGTM.

@carl-baillargeon carl-baillargeon merged commit 6eabc52 into aristanetworks:main Feb 13, 2025
25 checks passed
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 testcase to verify the BGP Redistributed Routes
4 participants