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

[Nokia ixs7215] Platform API 2.0 improvements #6787

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

dflynn-Nokia
Copy link
Contributor

This PR provides the following platform API 2.0 improvements for the Nokia
ixs7215 platform.

  • add support for Fan and PSU eeproms
  • bug fixes in platform firmware status and update logic
  • unit test enhancements and bug fixes
  • add platform specific reboot script
  • relocate pcie.yaml file

Why I did it

This PR has been created for the following reasons

  • Improve sonic-mgmt platform test suite pass rate
  • Improve coverage of platform unit tests
  • Provide platform specific reboot logic as per platform porting guide
  • Fix bug due to pcie.yaml file being located in the wrong directory

How I did it

Various code changes to platform API 2.0 logic

How to verify it

Verify all 'show platform' commands work as expected
Verify pass rate of sonic-mgmt platform test suite

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

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

This commit provides the following platform API 2.0 improvements for the Nokia
ixs7215 platform.

- add support for Fan and PSU eeproms
- bug fixes in platform firmware status and update logic
- unit test enhancements and bug fixes
- add platform specific reboot script
- relocate pcie.yaml file
Remove trailing spaces in firmware update command as per review comment.
@lgtm-com

This comment has been minimized.

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

Please fix LGTM alerts. Note that the "Wrong name for an argument in a class instantiation" alerts may be false alarms if you are overriding inherited methods. Please let me know if you have any questions.

@dflynn-Nokia
Copy link
Contributor Author

Thanks Joe. The multiply defined variable is an error on my part which I will fix in a new commit.
The 2 import errors are due to the init.py changes I made to model our code after that provided by Nvidia.
Our original init.py was empty. I could use your guidance on this one.
Lastly the "wrong name" issue is my attempt to pass values to our Eeprom class initializer to indicate whether the eeprom device is associated with a fan or psu. Other vendors seem to also use this approach.

Fix bug detected by LGTM
  - multiply defined function name
@lgtm-com
Copy link

lgtm-com bot commented Feb 16, 2021

This pull request introduces 4 alerts when merging e8a4ed9 into 7790a74 - view on LGTM.com

new alerts:

  • 2 for Wrong name for an argument in a class instantiation
  • 1 for Module imports itself
  • 1 for 'import *' may pollute namespace

@jleveque
Copy link
Contributor

The 2 import errors are due to the init.py changes I made to model our code after that provided by Nvidia.
Our original init.py was empty. I could use your guidance on this one.

Since other vendors have already merged code with these approaches, I an OK with allowing these alerts for the time being. However, we eventually need to clean this up. I have not investigated what can be done to eliminate these, but different vendors have taken different approaches to creating their sonic-platform package. I would suggest looking at the different implementations and see if you can find an approach which eliminates these alerts.

Lastly the "wrong name" issue is my attempt to pass values to our Eeprom class initializer to indicate whether the eeprom device is associated with a fan or psu. Other vendors seem to also use this approach.

Again, I am OK with allowing this alert for now. This is more of a false alarm because there are multiple sonic-platform packages, some which override and some which don't, and LGTM compares to the wrong definition. In the future, we may want to look into adding these parameters with default values in the base class or finding a different approach.

@dflynn-Nokia
Copy link
Contributor Author

/AzurePipelines run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 6787 in repo Azure/sonic-buildimage

@jleveque
Copy link
Contributor

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dflynn-Nokia
Copy link
Contributor Author

Thanks Joe.
Any plan to allow PR authors to do this?

@jleveque
Copy link
Contributor

Thanks Joe.
Any plan to allow PR authors to do this?

I'd love to be able to if possible. We're looking into it.

@dflynn-Nokia
Copy link
Contributor Author

Can we get this one merged and backported to 202012?

@jleveque jleveque merged commit cbe7493 into sonic-net:master Feb 23, 2021
yxieca pushed a commit that referenced this pull request Feb 23, 2021
- Improve sonic-mgmt platform test suite pass rate
- Improve coverage of platform unit tests
- Provide platform specific reboot logic as per platform porting guide
- Fix bug due to pcie.yaml file being located in the wrong directory
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
- Improve sonic-mgmt platform test suite pass rate
- Improve coverage of platform unit tests
- Provide platform specific reboot logic as per platform porting guide
- Fix bug due to pcie.yaml file being located in the wrong directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants