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

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

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 (688b67b) with main (d57b53e)

Summary

✅ 22 untouched benchmarks

anta/custom_types.py Outdated Show resolved Hide resolved
"""
Can be enabled in the `VerifyBGPPeerCount` tests."""
redistributed_route_protocol: Redistributed_Protocol | None = None
"""Specify redistributed route protocol."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"""Specify redistributed route protocol."""
"""Specify redistributed route protocol. Required field in the `VerifyBGPRedistributedRoutes` test."""

Also add validator in test case.

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

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 testcase to verify the BGP Redistributed Routes
2 participants