-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Platform] Accton add to support as4630-54te platform. #6683
[Platform] Accton add to support as4630-54te platform. #6683
Conversation
This pull request introduces 61 alerts when merging 638a205 into e387531 - view on LGTM.com new alerts:
|
@@ -0,0 +1,23 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These platform plugins have been deprecated in favor of the new sonic-platform package. Please refer to the documentation here: https://github.com/Azure/SONiC/wiki/Porting-Guide#sonic-platform-api-package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe "show version" still uses "decode-syseeprom" which loads this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the introduction of syseepromd, the system EEPROM contents should be collected by syseepromd and stored to State DB, and decode-syseeprom should simply pull the values from there.
It does appear that in show version
the call is made to sudo decode-syseeprom -s
, which will attempt to access the EEPROM directly. Instead, the call should probably be changed to sudo decode-syseeprom -d -s
to read the serial number from the DB.
Also, decode-syseeprom should be refactored to use the new sonic-platform package for direct access rather than the old eeprom.py plugin. I have created the following issue to track this improvement: sonic-net/sonic-utilities#1404
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have refactored decode-syseeprom to utilize the sonic-platform package via sonic-net/sonic-utilities#1435.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be safe to remove these plugins now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Goit it, I'll remove it.
@@ -0,0 +1,62 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These platform plugins have been deprecated in favor of the new sonic-platform package. Please refer to the documentation here: https://github.com/Azure/SONiC/wiki/Porting-Guide#sonic-platform-api-package
@@ -0,0 +1,196 @@ | |||
# sfputil.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These platform plugins have been deprecated in favor of the new sonic-platform package. Please refer to the documentation here: https://github.com/Azure/SONiC/wiki/Porting-Guide#sonic-platform-api-package
Dear Sonic community manager: |
This pull request introduces 52 alerts when merging cdc1291 into 5a49a0f - view on LGTM.com new alerts:
|
There was a problem hiding this 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.
This pull request introduces 6 alerts when merging f23935c into 7ec4d15 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 1bfc9bc into f77157f - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comments.
Also, please remove plugins/eeprom.py, plugins/psuutil.py and plugins/sfputil.py, as they should be no longer necessary.
@@ -0,0 +1,121 @@ | |||
############################################################################# | |||
# Celestica |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Celestica? Copy/paste issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is copy/paste issue. I'll remove the keyword.
SYSFS_PATH = "/sys/bus/i2c/devices" | ||
|
||
def __init__(self, thermal_index=0): | ||
self.index = thermal_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please call the superclass initializer here for completeness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for review, I'll modify it.
My testing code is Mon Feb 8 08:07:33 2021 -0800 |
The |
My fault!! The command: try: except ImportError as e: class board(eeprom_tlvinfo.TlvInfoDecoder):
log:root@sonic:/# show platform syseeprom Product Name 0x21 16 4630-54TE-O-AC-F |
I have refactored the utilities to no longer use the old plugins:
However, the sonic-utilities submodule has not yet been updated to reflect these changes in sonic-buildimage. I will do that soon. |
Got it. |
I would prefer it, yes. If you would like to wait until I update the submodule so that you can test again, please let me know. I just opened a PR to update the submodule here. |
By the way, |
I didn't realize you intended to backport this PR to earlier release branches, because none of the boxes are checked in the PR description. If that is the case, then we can go ahead and keep the plugins here, and we can delete them from the master branch in the future. |
Thank you for your suggestion. |
Add support for Accton as4630-54te platform
Add support for Accton as4630-54te platform
Add support for Accton as4630-54te platform
- Why I did it
My company(Accton) have a new model names: as4630-54te.
- How I did it
This pull request is based on as4630-54pe, so I reference as4630-54pe to create new model: as4630-54te
- How to verify it
Fan monitor is work, when execute the command: [accton_as4630_54te_util.py install], then the fan speed will come down.
SFP can detect module present, log show as follow:
=====================
...(skip)....
Ethernet48 Present
Ethernet49 Not present
Ethernet50 Present
Ethernet51 Not present
Ethernet52 Present
Ethernet56 Not present
=====================
PSU can detect the status:
=====================
root@sonic:/# psuutil status
PSU Status
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)