Skip to content

Commit 515265a

Browse files
authored
Update TRANSCEIVER_FIRMWARE_INFO table for all targets in sfputil (#3370)
Signed-off-by: Mihir Patel <[email protected]>
1 parent 3df762f commit 515265a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sfputil/main.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1316,10 +1316,8 @@ def update_firmware_info_to_state_db(port_name):
13161316
state_db.connect(state_db.STATE_DB)
13171317
transceiver_firmware_info_dict = platform_chassis.get_sfp(physical_port).get_transceiver_info_firmware_versions()
13181318
if transceiver_firmware_info_dict is not None:
1319-
active_firmware = transceiver_firmware_info_dict.get('active_firmware', 'N/A')
1320-
inactive_firmware = transceiver_firmware_info_dict.get('inactive_firmware', 'N/A')
1321-
state_db.set(state_db.STATE_DB, 'TRANSCEIVER_FIRMWARE_INFO|{}'.format(port_name), "active_firmware", active_firmware)
1322-
state_db.set(state_db.STATE_DB, 'TRANSCEIVER_FIRMWARE_INFO|{}'.format(port_name), "inactive_firmware", inactive_firmware)
1319+
for key, value in transceiver_firmware_info_dict.items():
1320+
state_db.set(state_db.STATE_DB, 'TRANSCEIVER_FIRMWARE_INFO|{}'.format(port_name), key, value)
13231321

13241322
# 'firmware' subgroup
13251323
@cli.group()

0 commit comments

Comments
 (0)