Skip to content

Commit 573717a

Browse files
authored
[Credo][Ycable] Fix Credo firmware download API download_firmware flag (#269)
Signed-off-by: vaibhav-dahiya <[email protected]> Due to PR #222 the download_firmware_status variable of download_firmware API was not cleaned up, due to which higher layer could sometimes see wrong values of firmware version. This PR addresses this issue. After calling a firmware download and not changing this variable admin@sonic:~$ show mux firmware version Ethernet0 { "version_nic_active": "N/A", "version_nic_inactive": "N/A", "version_nic_next": "N/A", "version_peer_active": "N/A", "version_peer_inactive": "N/A", "version_peer_next": "N/A", "version_self_active": "N/A", "version_self_inactive": "N/A", "version_self_next": "N/A" } after the change admin@sonic:~$ show mux firmware version Ethernet0 <versionX> { "version_nic_active": "1.0MS", "version_nic_inactive": "1.1MS", "version_nic_next": "1.0MS", "version_peer_active": "1.0MS", "version_peer_inactive": "1.1MS", "version_peer_next": "1.0MS", "version_self_active": "1.0MS", "version_self_inactive": "1.1MS", "version_self_next": "1.0MS" } Description Motivation and Context How Has This Been Tested? Tested on an Arista Device.
1 parent a844f18 commit 573717a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sonic_y_cable/credo/y_cable_credo.py

+2
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,8 @@ def download_firmware(self, fwfile):
15341534
self.log_error("platform_chassis is not loaded, failed to download firmware")
15351535
return YCable.EEPROM_ERROR
15361536

1537+
self.download_firmware_status = self.FIRMWARE_DOWNLOAD_STATUS_NOT_INITIATED_OR_FINISHED
1538+
15371539
return YCableBase.FIRMWARE_DOWNLOAD_SUCCESS
15381540

15391541
def activate_firmware(self, fwfile=None, hitless=False):

0 commit comments

Comments
 (0)