Skip to content

Commit

Permalink
Fix show interface counters for Chassis Packet Supervisor (sonic-net#…
Browse files Browse the repository at this point in the history
…3734)

What I did
On Chassis-packet supervisor, show interface counter -d all returns no data

How I did it
Fixed the condition in portstat.py to use right path for Chassis Packet RP to collect counters.
Added condition to collect link state information.

How to verify it
Run 'show interface counters -d all' on Chassis-Packet Supervisor
  • Loading branch information
anamehra authored Jan 30, 2025
1 parent 414935b commit 97b4e4b
Show file tree
Hide file tree
Showing 5 changed files with 2,578 additions and 3 deletions.
6 changes: 5 additions & 1 deletion scripts/portstat
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ try:
import sonic_py_common
from swsscommon.swsscommon import SonicV2Connector
sonic_py_common.device_info.is_supervisor = mock.MagicMock(return_value=True)
sonic_py_common.device_info.is_voq_chassis = mock.MagicMock(return_value=True)
if os.environ["UTILITIES_UNIT_TESTING_IS_PACKET_CHASSIS"] == "1":
sonic_py_common.device_info.is_voq_chassis = mock.MagicMock(return_value=False)
sonic_py_common.device_info.is_packet_chassis = mock.MagicMock(return_value=True)
else:
sonic_py_common.device_info.is_voq_chassis = mock.MagicMock(return_value=True)
SonicV2Connector.delete_all_by_pattern = mock.MagicMock()
if os.environ["UTILITIES_UNIT_TESTING_TOPOLOGY"] == "multi_asic":
import mock_tables.mock_multi_asic
Expand Down
2 changes: 2 additions & 0 deletions tests/portstat_db/on_sup_packet_chassis/chassis_state_db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
Loading

0 comments on commit 97b4e4b

Please sign in to comment.