-
Notifications
You must be signed in to change notification settings - Fork 163
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
Change PSU key to use get_name API instead of index #446
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Commenter does not have sufficient privileges for PR 446 in repo sonic-net/sonic-platform-daemons |
/azpw run |
@gregoryboudreau useful addition. Couple questions:
Additionally, please fix unit test failures that appear to be indexing related. Thanks! |
@gregoryboudreau can you please run sonic-mgmt test cases for PSU with all the changes. Attach the result to this PR? |
Let me know if there are other test cases that I missed in running, thanks! |
@assrinivasan with the get_name API implemented:
This is with the get_name API overwritten to raise NotImplemented for PSUs:
The only functional difference between the two is the key/naming |
@assrinivasan : can we please help with merge this. |
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.
LGTM
@prgeor please help review/merge as appropriate |
Change PSU key to use get_name API instead of index
Description
Changes PSU keys to be implemented via their get_name API like we do for fans instead of simple indexing. If the get_name API is not implemented by vendors then will fall back to the original indexing schema.
Motivation and Context
Makes PSU objects more clear in context by attaching their associated get_name to their PSU key similar to how it is done for fan objects.
How Has This Been Tested?
Along with other modifications in other repos, this is passing mgmt related test cases such as snmp tests and psu api tests. Additionally, can verify the output via
psushow
script.Additional Information (Optional)
Related PRs:
sonic-net/sonic-mgmt#11944
sonic-net/sonic-utilities#3208
sonic-net/sonic-snmpagent#312