[sfputil] Expose error status fetched from STATE_DB or platform API to CLI#1658
Merged
jleveque merged 4 commits intosonic-net:masterfrom Jun 25, 2021
Merged
[sfputil] Expose error status fetched from STATE_DB or platform API to CLI#1658jleveque merged 4 commits intosonic-net:masterfrom
jleveque merged 4 commits intosonic-net:masterfrom
Conversation
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
Author
|
Looks like it's the same error as that in sonic-net/sonic-buildimage#7848 |
- Available on Mellanox platform only - Platform API to fetch SFP error status via calling SDK API - CLI to call platform API in pmon docker and format the output Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
6993f8e to
62e9d87
Compare
jleveque
approved these changes
Jun 15, 2021
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
Author
|
Failed by dependencies on sonic-yang-mgmt |
liat-grozovik
approved these changes
Jun 20, 2021
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
@jleveque is it ok to merge now? |
Contributor
It appears so. The unrelated test failures have been fixed and tests are now passing. |
5 tasks
raphaelt-nvidia
pushed a commit
to raphaelt-nvidia/sonic-utilities
that referenced
this pull request
Aug 10, 2021
…o CLI (sonic-net#1658) Expose error status fetched from STATE_DB or platform API to CLI. The command is - `sfputil show error-status [-hw|--fetch-from-hardware] [<interface_name>]` - and `show interfaces transceiver error-status [-hw|--fetch-from-hardware] [<interface_name>]` The error status will be fetched from - `STATE_DB` by default - hardware via platform API if the parameter `--fetch-from-hardware` is provided. In this case, the CLI will call platform API in the pmon docker and format the output. Signed-off-by: Stephen Sun <stephens@nvidia.com>
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.
What I did
Expose error status fetched from STATE_DB or platform API to CLI.
The command is
sfputil show error-status [-hw|--fetch-from-hardware] [<interface_name>]show interfaces transceiver error-status [-hw|--fetch-from-hardware] [<interface_name>]The error status will be fetched from
STATE_DBby default--fetch-from-hardwareis provided.In this case, the CLI will call platform API in the pmon docker and format the output.
Signed-off-by: Stephen Sun stephens@nvidia.com
How I did it
How to verify it
Manually test and unit test
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)