Why I did it Command "sudo sfputil show error-status -hw" shows "OK (Not implemented)" in the output. How I did it Add a new SFP API get_error_description support in Nokia sonic-platform sfp.py module. How to verify it Run the new image and execute command "sudo sfputil show error-status -hw" Co-authored-by: Pavan-Nokia <120486223+Pavan-Nokia@users.noreply.github.com>
This commit is contained in:
parent
0af9feb2ec
commit
ff232d67bd
@ -974,3 +974,20 @@ class Sfp(SfpBase):
|
||||
integer: The 1-based relative physical position in parent device
|
||||
"""
|
||||
return self.index
|
||||
|
||||
def get_error_description(self):
|
||||
"""
|
||||
Retrives the error descriptions of the SFP module
|
||||
|
||||
Returns:
|
||||
String that represents the current error descriptions of vendor specific errors
|
||||
In case there are multiple errors, they should be joined by '|',
|
||||
like: "Bad EEPROM|Unsupported cable"
|
||||
"""
|
||||
|
||||
if not self.get_presence():
|
||||
error_description = self.SFP_STATUS_UNPLUGGED
|
||||
else:
|
||||
error_description = self.SFP_STATUS_OK
|
||||
|
||||
return error_description
|
||||
|
Reference in New Issue
Block a user