From 7c721e929f3dc5e5d37452aec02ae815835fbf6c Mon Sep 17 00:00:00 2001 From: mihirpat1 <112018033+mihirpat1@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:19:28 -0700 Subject: [PATCH] Modify "show interface transceiver status" CLI to show SW cmis state (#3238) Signed-off-by: Mihir Patel --- tests/mock_tables/state_db.json | 1 + tests/sfp_test.py | 1 + utilities_common/sfp_helper.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/mock_tables/state_db.json b/tests/mock_tables/state_db.json index 1f9969d0f9..f90d3f9e68 100644 --- a/tests/mock_tables/state_db.json +++ b/tests/mock_tables/state_db.json @@ -374,6 +374,7 @@ "rx_sig_power_max": "40" }, "TRANSCEIVER_STATUS|Ethernet44":{ + "cmis_state": "READY", "DP1State": "DataPathActivated", "DP2State": "DataPathActivated", "DP3State": "DataPathActivated", diff --git a/tests/sfp_test.py b/tests/sfp_test.py index 37a025a35c..22eda401e5 100644 --- a/tests/sfp_test.py +++ b/tests/sfp_test.py @@ -304,6 +304,7 @@ test_qsfp_dd_status_output = """\ Ethernet44: + CMIS State (SW): READY Tx fault flag on media lane 1: False Tx fault flag on media lane 2: False Tx fault flag on media lane 3: False diff --git a/utilities_common/sfp_helper.py b/utilities_common/sfp_helper.py index 09a96ca2ea..4a6ad65b57 100644 --- a/utilities_common/sfp_helper.py +++ b/utilities_common/sfp_helper.py @@ -47,6 +47,7 @@ # For non-CMIS, only first 1 or 4 lanes are applicable. # For CMIS, all 8 lanes are applicable. QSFP_STATUS_MAP = { + 'cmis_state': 'CMIS State (SW)', 'txfault1': 'Tx fault flag on media lane 1', 'txfault2': 'Tx fault flag on media lane 2', 'txfault3': 'Tx fault flag on media lane 3',