test_bgp_ session.py fails when DUT is running FRR unified framework #17376
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
This PR adds following updates to script
test_bgp_session.py
:Summary:
Fixes #16933
Type of change
Approach
What is the motivation for this PR?
test_bgp_session.py
fails on the DUT which has BGP-FRR unified framework enabled. The change is to update the script to work for frr_mgmt_framework_config set to true.
frr_mgmt_framework_config setting is in config_db DEVICE_METADATA section.
The change also includes updates to the test_bgp_session.py
script to support BGP IPv6 neighbors. The script was failing when there were IPv6 neighbors configured on the DUT.
Also, timeouts for some wait_until are increased to support T1 topology with >6k route scale, 16 BGP neighbors with timers 3/10.
How did you do it?
Updated the script to add a new def check_frr_mgmt_framework_config, which is called to handle the retrieval of bgp neighbor and neighbor ip values correctly. An if loop is added so the script works for both frr_mgmt_framework_config values.
How did you verify/test it?
bgp/test_bgp_session1.py::test_bgp_session_interface_down[interface-bgp_docker] PASSED [ 16%]
bgp/test_bgp_session1.py::test_bgp_session_interface_down[interface-swss_docker] PASSED [ 33%]
bgp/test_bgp_session1.py::test_bgp_session_interface_down[interface-reboot] PASSED [ 50%]
bgp/test_bgp_session1.py::test_bgp_session_interface_down[neighbor-bgp_docker] PASSED [ 66%]
bgp/test_bgp_session1.py::test_bgp_session_interface_down[neighbor-swss_docker] PASSED [ 83%]
bgp/test_bgp_session1.py::test_bgp_session_interface_down[neighbor-reboot] PASSED [100%]
Any platform specific information?
No
Supported testbed topology if it's a new test case?
N/A
Documentation
N/A