-
Notifications
You must be signed in to change notification settings - Fork 672
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
[psushow] Add more output columns; Add option to output in JSON format #1416
Merged
Conversation
This file contains 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
This comment has been minimized.
This comment has been minimized.
jleveque
changed the title
[psushow] Add more output columns
[psushow] Add more output columns; Add option to output in JSON format
Feb 18, 2021
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This pull request fixes 1 alert when merging 2a37cb6 into 0eaabfd - view on LGTM.com fixed alerts:
|
lguohan
approved these changes
Feb 24, 2021
3 tasks
yxieca
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Feb 26, 2021
…ded output (#3040) Approach What is the motivation for this PR? Update testing of show platform psustatus to handle the new, expanded output provided by sonic-net/sonic-utilities#1416. Maintain backward-compatibility with the previous syntax in 201811 and 201911 versions. How did you do it? Support both output formats based on observed OS version How did you verify/test it? Tested against one platform with old and new output formats
anand-kumar-subramanian
pushed a commit
to anand-kumar-subramanian/sonic-utilities
that referenced
this pull request
Mar 2, 2021
sonic-net#1416) - Enhance `psushow -s` output, adding columns to display PSU Model, Serial, Voltage, Current and Power - Add `-j/--json` option to display output in JSON format - Update mock State DB PSU_INFO table to provide values which we can ensure floats are padded to two decimal places in tabular display mode - Add `--json` option to `show platform psustatus` which in turn adds the `-j` flag to the underlying `psushow` call - Add unit tests for `psushow` in psushow_test.py - Add more unit tests for `show platform psustatus` and move to show_platform_test.py
yxieca
pushed a commit
that referenced
this pull request
Mar 3, 2021
#1416) - Enhance `psushow -s` output, adding columns to display PSU Model, Serial, Voltage, Current and Power - Add `-j/--json` option to display output in JSON format - Update mock State DB PSU_INFO table to provide values which we can ensure floats are padded to two decimal places in tabular display mode - Add `--json` option to `show platform psustatus` which in turn adds the `-j` flag to the underlying `psushow` call - Add unit tests for `psushow` in psushow_test.py - Add more unit tests for `show platform psustatus` and move to show_platform_test.py
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.
- What I did
psushow -s
output, adding columns to display PSU Model, Serial, Voltage, Current and Power-j/--json
option to display output in JSON format--json
option toshow platform psustatus
which in turn adds the-j
flag to the underlyingpsushow
callpsushow
in psushow_test.pyshow platform psustatus
and move to show_platform_test.py- How to verify it
Run
psushow -s
variants- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)