Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DellEMC: Z9332f - SFP API get_error_description implementation #9071

Merged

Conversation

ArunSaravananBalachandran
Copy link
Contributor

Why I did it

To implement SFP API get_error_description for DellEMC Z9332f.

How I did it

Implement the API in sfp.py

How to verify it

Verified that the return type is as expected.
UT logs: Z9332f_UT_logs.txt

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

DellEMC: Z9332f - SFP API get_error_description implementation

A picture of a cute animal (not mandatory but encouraged)

@prgeor
Copy link
Contributor

prgeor commented Nov 2, 2021

@ArunSaravananBalachandran can you address the build failure

@prgeor
Copy link
Contributor

prgeor commented Nov 2, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

return self.SFP_STATUS_UNPLUGGED
else:
if not os.path.isfile(self.eeprom_path):
return "EEPROM driver is not initialized"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be optoe driver? i believe if the binding to optoe driver fails then the sysfs eeprom file wont' be created.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have updated the error message to "EEPROM driver is not attached"

elif self.sfp_type == 'QSFP':
offset = QSFP_INFO_OFFSET
elif self.sfp_type == 'QSFP_DD':
offset = QSFP_DD_PAGE0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle unknown type error i.e if sfp_type is neither SFP, QSFP nor QSFP-DD

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current implementation the value of instance variable sfp_type will not have any other value than one of SFP, QSFP, QSFP_DD

@prgeor
Copy link
Contributor

prgeor commented Nov 4, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor prgeor merged commit 2d7840c into sonic-net:master Nov 4, 2021
@ArunSaravananBalachandran ArunSaravananBalachandran deleted the Z9332f_sfp_error_desc branch November 15, 2021 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants