[snmp-psu] update SNMP PSU test to ignore PSU working status check #673
Closed
keboliu wants to merge 1 commit intosonic-net:masterfrom
keboliu:snmp-psu-update
Closed
[snmp-psu] update SNMP PSU test to ignore PSU working status check #673keboliu wants to merge 1 commit intosonic-net:masterfrom keboliu:snmp-psu-update
keboliu wants to merge 1 commit intosonic-net:masterfrom
keboliu:snmp-psu-update
Conversation
qiluo-msft
reviewed
Aug 6, 2018
| snmp_facts: host={{ ansible_host }} version=v2c community={{ snmp_rocommunity }} | ||
| connection: local | ||
|
|
||
| # We assume that all the PSUs tested should be in good status, otherwise, fix the PSU manually |
Contributor
There was a problem hiding this comment.
We assume t [](start = 1, length = 12)
Should you also test whether there is at least one PSU in good status?
There was a problem hiding this comment.
Not sure this is required. if we have single PSU with bad state IMO the system cannot run. Am I missing something?
Contributor
There was a problem hiding this comment.
I mean 'test whether there is at least one PSU in good status'. If this is not true, all PSU is not working, which is impossible in real system.
|
@keboliu after further discussion about this, please add a parameter of how many PSUs are expected and test existence based on the value provided. |
wangxin
pushed a commit
to wangxin/sonic-mgmt
that referenced
this pull request
Oct 27, 2025
<!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Fixes # (issue) Microsoft ADO: 30577576 ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] Test case(new/improvement) ### Back port request - [ ] 202012 - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 ### Approach #### What is the motivation for this PR? We have detected a syntax warning when using the gNMI client with Python 3: E Exception: error:/root/gnxi/gnmi_cli_py/py_gnmicli.py:508: SyntaxWarning: "is not" with a literal. Did you mean "!="? E if filter_event_regex is not "": E /root/gnxi/gnmi_cli_py/py_gnmicli.py:510: SyntaxWarning: "is not" with a literal. Did you mean "!="? E if len(match) is not 0: #### How did you do it? Do not check stderr in the test #### How did you verify/test it? Run gnmi end to end test #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
…D automatically (#23915) #### Why I did it src/sonic-platform-daemons ``` * c5e545e - (HEAD -> 202505, origin/202505) [202505] [xcvrd] Improve logging in case of unable to find appropriate match for optic SI settings (sonic-net#672) (sonic-net#673) (38 minutes ago) [mihirpat1] ``` #### How I did it #### How to verify it #### Description for the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Current SNMP PSU status is assuming DUT shall have two PSU and work properly. If PSU is not in 'OK' status the test will fail. This test should focus on whether can get the PSU status via SNMP rather than judge the PSU working status.
So update the PSU test case to judge whether can successfully get the PSU status from SNMP and ignore whether the PSU is working well or not.
Type of change
Approach
How did you do it?
change the test failure criteria to not able to get the PSU status from SNMP.
How did you verify/test it?
run test on mlnx platform testbed