Skip to content

[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 #673
keboliu wants to merge 1 commit intosonic-net:masterfrom
keboliu:snmp-psu-update

Conversation

@keboliu
Copy link
Copy Markdown
Contributor

@keboliu keboliu commented Aug 3, 2018

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

  • [] Bug fix
  • [] Testbed and Framework(new/improvement)
  • Test case(new/improvement)

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

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We assume t [](start = 1, length = 12)

Should you also test whether there is at least one PSU in good status?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not sure this is required. if we have single PSU with bad state IMO the system cannot run. Am I missing something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comment

@liatgrozovik
Copy link
Copy Markdown

@keboliu after further discussion about this, please add a parameter of how many PSUs are expected and test existence based on the value provided.
If one would like to run with single PSU he will be able.

@keboliu keboliu closed this Aug 27, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants