Skip to content

Commit

Permalink
add upstream linecard check for chassis_packet, T2 Cisco device, for …
Browse files Browse the repository at this point in the history
…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: [email protected]
  • Loading branch information
augusdn authored and mssonicbld committed Dec 13, 2024
1 parent ae8c797 commit 2746d58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/route/test_route_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']))
Expand Down

0 comments on commit 2746d58

Please sign in to comment.