Add testplan and test implementation for BGP Local-Preference feature#7
Open
bpar9 wants to merge 4 commits into
Open
Add testplan and test implementation for BGP Local-Preference feature#7bpar9 wants to merge 4 commits into
bpar9 wants to merge 4 commits into
Conversation
This commit adds: - docs/testplan/BGP-Local-Preference-Test-Plan.md: Comprehensive testplan documenting 10 test cases for BGP Local-Preference functionality - tests/bgp/test_bgp_local_preference.py: pytest implementation with 8 tests Test cases cover: - Default local-preference value (100) - Setting local-preference via route-maps - IPv6 route support - Boundary values (0 and max uint32) - Local-preference override - Persistence after BGP restart - Route-map configuration verification Co-Authored-By: bhavani@cisco.com <bhavani@cisco.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Add Test Case #11: Local-Preference with Multiple Paths - Add Test Case #12: Local-Preference with Equal Values (Tie-Breaking) - Add Test Case #13: Local-Preference Interaction with AS-Path - Add Test Case #14: Local-Preference Interaction with MED - Add Test Case #15: Local-Preference Interaction with Weight - Add Test Case #16: Local-Preference with Route Flapping - Extend topology support to include t0 and t0-multi-asic - Update scope section to reflect new test coverage Co-Authored-By: bhavani@cisco.com <bhavani@cisco.com>
- Add test_local_preference_multiple_paths (Test Case #11) - Add test_local_preference_equal_values_tiebreaker (Test Case #12) - Add test_local_preference_vs_aspath (Test Case #13) - Add test_local_preference_vs_med (Test Case #14) - Add test_local_preference_vs_weight (Test Case #15) - Add test_local_preference_route_flapping (Test Case #16) - Add helper functions for multi-path testing - Update pytestmark to support t0 and t0-multi-asic topologies Co-Authored-By: bhavani@cisco.com <bhavani@cisco.com>
…plan - Test Case #17: Local-Preference Preservation via Route Reflector - Test Case #18: Local-Preference Set by Route Reflector - Test Case #19: Local-Preference Best Path Selection via Route Reflector - Test Case #20: Local-Preference with Multiple Route Reflector Clients - Test Case #21: Local-Preference Override at Route Reflector Client - Updated scope section to include route reflector scenarios
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
This PR adds a comprehensive test plan document and pytest implementation for validating the BGP Local-Preference feature in SONiC. BGP Local-Preference is a well-known path attribute used to influence outbound traffic routing decisions within an AS, where higher values are preferred (default is 100).
Reviewer start point: Begin with the test plan document to understand the test coverage, then review the test implementation for correctness.
Files added:
docs/testplan/BGP-Local-Preference-Test-Plan.md- Test plan documenting 21 test casestests/bgp/test_bgp_local_preference.py- Pytest implementation with 14 test functionsLink to Devin run: https://cisco-demo.devinenterprise.com/sessions/71c0f42835ce4a9586a92d30b6615c2c
Requested by: @bpar9
Updates since last revision
Type of change
Back port request
Approach
What is the motivation for this PR?
To provide automated test coverage for the BGP Local-Preference feature, validating that SONiC correctly handles local-preference configuration via route-maps and applies it to BGP path selection.
How did you do it?
How did you verify/test it?
Items for reviewer attention:
test_local_preference_persistence_after_bgp_restartassumes vtysh route-map config persists after BGP restart - please verify this matches expected SONiC/FRR behaviorAny platform specific information?
None - tests use vtysh for route-map configuration which is platform-agnostic.
Supported testbed topology if it's a new test case?
Documentation
Test plan document added at
docs/testplan/BGP-Local-Preference-Test-Plan.md