Issue 20728: Enhance configlet/test_add_rack.py for ipv6-only topos #21591
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:
Currently, the test checks for both ipv4 and ipv6 neighbors unconditionally, and will fail if either is missing. Change that behavior to instead check to see if neighbors exist before running the bgp checks. Add a failure case if no neighbors are found in either AF. This way the test is AF-agnostic.
Closes #20728
Type of change
Back port request
Approach
What is the motivation for this PR?
Extend coverage for IPv6-only topos
How did you do it?
Add logic to check whether v4/v6 neighbor ips exist before checking whether they are up. If no neighbor ips are found at all, the test fails.
How did you verify/test it?
Ran the test on a vs topo with only v6 neighbors. It fails before these changes and passes after they are added.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation