Add pcieinfo code#217
Merged
sharmavijay-ms merged 7 commits intoAzure:kubesonicfrom May 5, 2026
Merged
Conversation
added 3 commits
May 4, 2026 15:54
Author
|
Arista results CLI GNMI |
Author
|
Mellanox results when one check fails: CLI: GNMI |
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Sreevanich16
reviewed
May 5, 2026
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
sharmavijay-ms
approved these changes
May 5, 2026
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.
Why I did it
Added gNMI getter for show platform pcieinfo so client can fetchdevice PCIe information via gNMI in JSON format.
How I did it
Runs host-side Python through existing helper (common.GetDataFromHostCommand).
Uses platform API loading logic aligned with sonic-utilities behavior:
tries sonic_platform.pcie.Pcie
falls back to sonic_platform_base.sonic_pcie.pcie_common.PcieUtil
Supports:
default mode: get_pcie_device()
check mode: get_pcie_check() when check=true
Returns JSON directly (validated with json.Valid)
(SHOW command specific) What sources are you using to fetch data?
Host side python cmd
How to verify it (Please provide snapshot of diff coverage from CI pipeline)
(Show command specific) Output of show CLI that is equivalent to API output
Note: Mellanox results below, Arista results and Mellanox check failing results in comments
Manual test output of API on device (Please provide output from device that you have tested your changes on)
Mellanox results below, Arista added in comments
A picture of a cute animal (not mandatory but encouraged)