From 2746d58175fecc3c807adf25cfd07a3658fd48ac Mon Sep 17 00:00:00 2001 From: augusdn Date: Fri, 13 Dec 2024 15:24:04 +1100 Subject: [PATCH] add upstream linecard check for chassis_packet, T2 Cisco device, for correct max_prefix_cnt (#16043) Description of PR Summary: add upstream linecard check for chassis_packet, T2 Cisco device in get_route_prefix_snapshot_from_asicdb This was to use correct num_routes_withdrawn during asserts, where we only had upstream support for 'voq' and failed for 'chassis_packet' Approach What is the motivation for this PR? How did you do it? How did you verify/test it? ------------------------------------------------------ generated xml file: /var/src/sonic-mgmt-int/tests/logs/route/test_route_consistency.xml ------------------------------------------------------ ============================================================================= 3 passed, 1 warning in 1482.39s (0:24:42) co-authorized by: jianquanye@microsoft.com --- tests/route/test_route_consistency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/route/test_route_consistency.py b/tests/route/test_route_consistency.py index f36cfdf0935..47f13f00640 100644 --- a/tests/route/test_route_consistency.py +++ b/tests/route/test_route_consistency.py @@ -31,7 +31,7 @@ def get_route_prefix_snapshot_from_asicdb(self, duthosts): for idx, dut in enumerate(duthosts.frontend_nodes): for asic in dut.asics: dut_instance_name = dut.hostname + '-' + str(asic.asic_index) - if dut.facts['switch_type'] == "voq" and idx == 0: + if dut.facts['switch_type'] in ["voq", "chassis_packet"] and idx == 0: dut_instance_name = dut_instance_name + "UpstreamLc" prefix_snapshot[dut_instance_name] = \ set(self.extract_dest_ips(asic.run_sonic_db_cli_cmd('ASIC_DB KEYS *ROUTE_ENTRY*')['stdout_lines']))