-
Notifications
You must be signed in to change notification settings - Fork 175
Change PSU key to use get_name API instead of index #446
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
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 |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@judyjoseph to help merge this PR |
- What I did Modified snmp implementation of Cisco MIB to use updated format for psu keys instead of index of PSU - How I did it Used a consistently sorted list of keys to allow for the modified statedb key naming for psus - How to verify it Ran the associated sonic-mgmt tests for PSUs (phy_entity and snmp_psu) - Description for the changelog Modifies SNMP implementation of Cisco PSUs to use key names instead of simple indexing Related PRs: sonic-net/sonic-mgmt#11944 sonic-net/sonic-utilities#3208 sonic-net/sonic-platform-daemons#446
@abdosi can this be brought into msft 202405? |
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