Skip to content

Commit

Permalink
Merge pull request #79 from mssonicbld/sonicbld/202305-merge
Browse files Browse the repository at this point in the history
[code sync] Merge code from sonic-net/sonic-utilities.msft:202305 to 202305
  • Loading branch information
mssonicbld authored Jun 21, 2024
2 parents d781401 + 7b5de75 commit 6968968
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sfputil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,10 +1171,8 @@ def update_firmware_info_to_state_db(port_name):
state_db.connect(state_db.STATE_DB)
transceiver_firmware_info_dict = platform_chassis.get_sfp(physical_port).get_transceiver_info_firmware_versions()
if transceiver_firmware_info_dict is not None:
active_firmware = transceiver_firmware_info_dict.get('active_firmware', 'N/A')
inactive_firmware = transceiver_firmware_info_dict.get('inactive_firmware', 'N/A')
state_db.set(state_db.STATE_DB, 'TRANSCEIVER_FIRMWARE_INFO|{}'.format(port_name), "active_firmware", active_firmware)
state_db.set(state_db.STATE_DB, 'TRANSCEIVER_FIRMWARE_INFO|{}'.format(port_name), "inactive_firmware", inactive_firmware)
for key, value in transceiver_firmware_info_dict.items():
state_db.set(state_db.STATE_DB, 'TRANSCEIVER_FIRMWARE_INFO|{}'.format(port_name), key, value)

# 'firmware' subgroup
@cli.group()
Expand Down

0 comments on commit 6968968

Please sign in to comment.