forked from sonic-net/sonic-platform-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate common code for remote target FW upgrade supported optics (s…
…onic-net#453) * Separate common code for remote side FW upgrade supported optics Signed-off-by: Mihir Patel <[email protected]> * Added newline to EOF * Moved TARGET_MODE to Credo specific memmap --------- Signed-off-by: Mihir Patel <[email protected]>
- Loading branch information
Showing
6 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
sonic_platform_base/sonic_xcvr/api/public/cmisTargetFWUpgrade.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
cmisTargetFWUpgrade.py | ||
Implementation of XcvrApi for CMIS based modules supporting firmware | ||
upgrade of remote target from the local target itself. | ||
""" | ||
|
||
from ...fields import consts | ||
from .cmis import CmisApi | ||
|
||
class CmisTargetFWUpgradeAPI(CmisApi): | ||
def set_firmware_download_target_end(self, target): | ||
return self.xcvr_eeprom.write(consts.TARGET_MODE, target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
from ..public.cmis import CmisCodes | ||
from ..public.cmisTargetFWUpgrade import CmisTargetFWUpgradeCodes | ||
|
||
class CmisAec800gCodes(CmisCodes): | ||
TARGET_MODE = { | ||
0: 'local', | ||
1: 'remote-A', | ||
2: 'remote-B' | ||
} | ||
class CmisAec800gCodes(CmisTargetFWUpgradeCodes): | ||
# Vendor specific implementation to be added here | ||
pass |
8 changes: 8 additions & 0 deletions
8
sonic_platform_base/sonic_xcvr/codes/public/cmisTargetFWUpgrade.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from .cmis import CmisCodes | ||
|
||
class CmisTargetFWUpgradeCodes(CmisCodes): | ||
TARGET_MODE = { | ||
0: 'local', | ||
1: 'remote-A', | ||
2: 'remote-B' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
sonic_platform_base/sonic_xcvr/mem_maps/public/cmisTargetFWUpgrade.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
cmisTargetFWUpgrade.py | ||
Implementation of memory map for CMIS based modules supporting firmware | ||
upgrade of remote target from the local target itself. | ||
""" | ||
|
||
from .cmis import CmisMemMap | ||
|
||
class CmisTargetFWUpgradeMemMap(CmisMemMap): | ||
# Vendor agnostic implementation to be added here | ||
pass |