From a082657cc58a73b302502bee7ff7d9c3c61f2c95 Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Fri, 18 Apr 2025 19:45:50 +0000 Subject: [PATCH] [default-route-bgp-flap]: [T2] Fix and handle AZNG route-map for upstream LC ### Description of PR Summary: Fixes # (issue) In addition to the fix provided by #15962 for the issue #9052, this code change is also needed for handling AZNG route map changes on upstream LC. ### Type of change - [x] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request - [ ] 202012 - [ ] 202205 - [ ] 202305 - [ ] 202311 - [x] 202405 - [x] 202411 ### Approach #### What is the motivation for this PR? - '_test_default_route_with_bgp_flap_', for msft specific AZNG route maps on upstream LC fails even with the fix provided by #15962 #### How did you do it? - In addition to the fix provided by #15962 , handle the case for all route maps. #### How did you verify/test it? - Ran the test on T2 chassis with upstream LC, having different sets of route maps and made sure the tests are passing as expected. #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation ![image](https://github.com/user-attachments/assets/b7098b57-8225-4039-8ddb-8f3326ba7062) --- tests/route/test_default_route.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/route/test_default_route.py b/tests/route/test_default_route.py index eba76f4ca0..0054d365b4 100644 --- a/tests/route/test_default_route.py +++ b/tests/route/test_default_route.py @@ -116,6 +116,7 @@ def verify_default_route_in_app_db(duthost, tbinfo, af, uplink_ns, device_neigh_ upstream_neigh = get_upstream_neigh(tbinfo, device_neigh_metadata, af, nexthops) pytest_assert(upstream_neigh is not None, "No upstream neighbors in the testbed") + upstream_neigh = {k: v for k, v in upstream_neigh.items() if any(upstream_neigh.get(k))} if af == 'ipv4': upstream_neigh_ip = set([upstream_neigh[neigh][0]