Skip to content
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

[psuutil] Refactor to utilize sonic-platform package #1434

Merged
merged 4 commits into from
Feb 16, 2021
Merged

[psuutil] Refactor to utilize sonic-platform package #1434

merged 4 commits into from
Feb 16, 2021

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Feb 12, 2021

What I did

Refactor psuutil to use sonic-platform package in lieu of old, deprecated platform plugins.

The psuutil utility is still useful, as psushow only reads and displays PSU data from State DB. However, this utility provides us the ability to read directly from the PSUs which is helpful for debugging.

How I did it

  • Complete refactor to use sonic-platform package
  • Refactor display functions to align with psushow utility (add more output columns)
  • Bump version to 2.0
  • Add basic unit tests

How to verify it

Run all psuutil commands, ensure they work. Do the same on multiple platforms. Output should be the same as before.

Previous command output (if the output of a command-line utility has changed)

admin@sonic~: psuutil status
PSU    Status
-----  --------
PSU 1  OK
PSU 2  OK

New command output (if the output of a command-line utility has changed)

admin@sonic~: psuutil status
PSU    Model    Serial                          Voltage (V)    Current (A)    Power (W)  Status    LED
-----  -------  ----------------------------  -------------  -------------  -----------  --------  -----
PSU1   0XNMHJ   CN-0XNMHJ-DED00-036-00M3-A00          12.21           7.17         91.6  OK        green
PSU2   0XNMHJ   CN-0XNMHJ-DED00-036-00H0-A00          12.19           8.46        103.3  OK        green

@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2021

This pull request introduces 2 alerts when merging bb3af31 into 18cd8ba - view on LGTM.com

new alerts:

  • 1 for Unused import
  • 1 for Variable defined multiple times

@jleveque jleveque marked this pull request as ready for review February 12, 2021 22:18
@jleveque jleveque merged commit 310d203 into sonic-net:master Feb 16, 2021
@jleveque jleveque deleted the psuutil_use_sonic_platform branch February 16, 2021 17:24
yxieca pushed a commit that referenced this pull request Feb 23, 2021
#### What I did

Refactor psuutil to use sonic-platform package in lieu of old, deprecated platform plugins.

The psuutil utility is still useful, as psushow only reads and displays PSU data from State DB. However, this utility provides us the ability to read directly from the PSUs which is helpful for debugging.

#### How I did it

- Complete refactor to use sonic-platform package
- Add more output columns to display (Model, Serial, Voltage, Current, Power)
- Bump version to 2.0
- Add basic unit tests
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
#### What I did

Refactor psuutil to use sonic-platform package in lieu of old, deprecated platform plugins.

The psuutil utility is still useful, as psushow only reads and displays PSU data from State DB. However, this utility provides us the ability to read directly from the PSUs which is helpful for debugging.

#### How I did it

- Complete refactor to use sonic-platform package
- Add more output columns to display (Model, Serial, Voltage, Current, Power)
- Bump version to 2.0
- Add basic unit tests
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
Avoid adding loopback interface (ip link add) when setting nat zone on
loopback interface (sonic-net#1434)
    [acl] Remove Ethertype from L3V6 qualifiers (sonic-net#1433)
    Sflow fixes during DEL processing (sonic-net#1427)
    Fix #3971 by skipping create-only SAI attributes when modifying
    buffer pools or profiles in orchagent (sonic-net#1430)
    Fix issue: bufferorch only pass the first attribute to sai when
    setting attribute (sonic-net#1442)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants