diff --git a/scripts/sfpshow b/scripts/sfpshow index 85e8d8a1f1..8312344513 100755 --- a/scripts/sfpshow +++ b/scripts/sfpshow @@ -335,6 +335,9 @@ class SFPShow(object): output += covert_application_advertisement_to_output_string(indent, sfp_info_dict) elif key == 'active_firmware' or key == 'inactive_firmware': output += '{}{}: {}\n'.format(indent, data_map[key], sfp_firmware_info_dict[key] if key in sfp_firmware_info_dict else 'N/A') + elif key.startswith(('e1_', 'e2_')): + if key in sfp_firmware_info_dict: + output += '{}{}: {}\n'.format(indent, data_map[key], sfp_firmware_info_dict[key]) else: output += '{}{}: {}\n'.format(indent, data_map[key], sfp_info_dict[key]) diff --git a/tests/mock_tables/asic1/state_db.json b/tests/mock_tables/asic1/state_db.json index 195b8e87f3..dd76cb7f50 100644 --- a/tests/mock_tables/asic1/state_db.json +++ b/tests/mock_tables/asic1/state_db.json @@ -70,7 +70,13 @@ }, "TRANSCEIVER_FIRMWARE_INFO|Ethernet64": { "active_firmware": "X.X", - "inactive_firmware": "X.X" + "inactive_firmware": "X.X", + "e1_active_firmware" : "X.X", + "e1_inactive_firmware" : "Y.Y", + "e1_server_firmware" : "A.B.C.D", + "e2_active_firmware" : "X.X", + "e2_inactive_firmware" : "Y.Y", + "e2_server_firmware" : "A.B.C.D" }, "CHASSIS_INFO|chassis 1": { "psu_num": "2" diff --git a/tests/mock_tables/state_db.json b/tests/mock_tables/state_db.json index b622705be1..640c39765d 100644 --- a/tests/mock_tables/state_db.json +++ b/tests/mock_tables/state_db.json @@ -692,7 +692,13 @@ }, "TRANSCEIVER_FIRMWARE_INFO|Ethernet64": { "active_firmware": "X.X", - "inactive_firmware": "X.X" + "inactive_firmware": "X.X", + "e1_active_firmware" : "X.X", + "e1_inactive_firmware" : "Y.Y", + "e1_server_firmware" : "A.B.C.D", + "e2_active_firmware" : "X.X", + "e2_inactive_firmware" : "Y.Y", + "e2_server_firmware" : "A.B.C.D" }, "TRANSCEIVER_INFO|Ethernet72": { "active_apsel_hostlane4": "N/A", diff --git a/tests/sfp_test.py b/tests/sfp_test.py index 22eda401e5..02bce83f5a 100644 --- a/tests/sfp_test.py +++ b/tests/sfp_test.py @@ -600,6 +600,12 @@ 100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 400ZR, DWDM, amplified - Media Assign (0x1) CMIS Rev: 4.1 Connector: LC + E1 Active Firmware: X.X + E1 Inactive Firmware: Y.Y + E1 Server Firmware: A.B.C.D + E2 Active Firmware: X.X + E2 Inactive Firmware: Y.Y + E2 Server Firmware: A.B.C.D Encoding: N/A Extended Identifier: Power Class 8 (20.0W Max) Extended RateSelect Compliance: N/A @@ -690,6 +696,12 @@ 100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 400ZR, DWDM, amplified - Media Assign (0x1) CMIS Rev: 4.1 Connector: LC + E1 Active Firmware: X.X + E1 Inactive Firmware: Y.Y + E1 Server Firmware: A.B.C.D + E2 Active Firmware: X.X + E2 Inactive Firmware: Y.Y + E2 Server Firmware: A.B.C.D Encoding: N/A Extended Identifier: Power Class 8 (20.0W Max) Extended RateSelect Compliance: N/A @@ -780,6 +792,12 @@ 100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 400ZR, DWDM, amplified - Media Assign (0x1) CMIS Rev: 4.1 Connector: LC + E1 Active Firmware: X.X + E1 Inactive Firmware: Y.Y + E1 Server Firmware: A.B.C.D + E2 Active Firmware: X.X + E2 Inactive Firmware: Y.Y + E2 Server Firmware: A.B.C.D Encoding: N/A Extended Identifier: Power Class 8 (20.0W Max) Extended RateSelect Compliance: N/A diff --git a/utilities_common/sfp_helper.py b/utilities_common/sfp_helper.py index 4a6ad65b57..e38e764c9c 100644 --- a/utilities_common/sfp_helper.py +++ b/utilities_common/sfp_helper.py @@ -38,7 +38,13 @@ 'supported_max_tx_power': 'Supported Max TX Power', 'supported_min_tx_power': 'Supported Min TX Power', 'supported_max_laser_freq': 'Supported Max Laser Frequency', - 'supported_min_laser_freq': 'Supported Min Laser Frequency' + 'supported_min_laser_freq': 'Supported Min Laser Frequency', + 'e1_active_firmware': 'E1 Active Firmware', + 'e1_inactive_firmware': 'E1 Inactive Firmware', + 'e1_server_firmware': 'E1 Server Firmware', + 'e2_active_firmware': 'E2 Active Firmware', + 'e2_inactive_firmware': 'E2 Inactive Firmware', + 'e2_server_firmware': 'E2 Server Firmware' } CMIS_DATA_MAP = {**QSFP_DATA_MAP, **QSFP_CMIS_DELTA_DATA_MAP}