Skip to content

Added show platform firmware status command#213

Merged
Deepak-Pandey merged 7 commits intoAzure:kubesonicfrom
Deepak-Pandey:deepakpandey/add_show_platform_firmware_status
May 5, 2026
Merged

Added show platform firmware status command#213
Deepak-Pandey merged 7 commits intoAzure:kubesonicfrom
Deepak-Pandey:deepakpandey/add_show_platform_firmware_status

Conversation

@Deepak-Pandey
Copy link
Copy Markdown

@Deepak-Pandey Deepak-Pandey commented Apr 28, 2026

MS ADO: 37718014

Why I did it

Added gNMI getter for show platform firmware status so client can fetch platform information via gNMI in JSON format.

How I did it

Added getPlatformFirmware() function which uses nsenter to get data from Platform() api.

How to verify it

admin@<machine>:~$ show platform firmware status
Chassis          Module    Component    Version    Description
---------------  --------  -----------  ---------  --------------------------------
8101-32FH-O-C01  N/A       BIOS         0-15       BIOS - Basic Input Output System
                           SSD          2.0        SSD
                           Aikido       3.12       Aikido - x86 FPGA
                           TAM          2.6        TAM FW - x86
                           uIOFPGA      1.8        IOFPGA
                           CPLD_CPU     1.11       CPU_CPLD
                           CPLD_SYS     1.14       SYS_CPLD
                           CPLD_LED     1.4        LED_CPLD
                           CPLD_FAN     1.8        FAN_CPLD

Output from Mellanox 5640:

root@<machine>:/# gnmi_get -xpath_target SHOW -xpath platform/firmware/status -target_addr <machine-ip> -logtostderr -insecure true
== getRequest:
prefix: <
  target: "SHOW"
>
path: <
  elem: <
    name: "platform"
  >
  elem: <
    name: "firmware"
  >
  elem: <
    name: "status"
  >
>
encoding: JSON_IETF

== getResponse:
notification: <
  timestamp: 1777912503662494202
  prefix: <
    target: "SHOW"
  >
  update: <
    path: <
      elem: <
        name: "platform"
      >
      elem: <
        name: "firmware"
      >
      elem: <
        name: "status"
      >
    >
    val: <
      json_ietf_val: "{\"chassis\":\"8101-32FH-O-C01\",\"module\":\"N/A\",\"components\":[{\"name\":\"BIOS\",\"version\":\"0-15\",\"description\":\"BIOS - Basic Input Output System\"},{\"name\":\"SSD\",\"version\":\"2.0\",\"description\":\"SSD\"},{\"name\":\"Aikido\",\"version\":\"3.12\",\"description\":\"Aikido - x86 FPGA\"},{\"name\":\"TAM\",\"version\":\"2.6\",\"description\":\"TAM FW - x86\"},{\"name\":\"uIOFPGA\",\"version\":\"1.8\",\"description\":\"IOFPGA\"},{\"name\":\"CPLD_CPU\",\"version\":\"1.11\",\"description\":\"CPU_CPLD\"},{\"name\":\"CPLD_SYS\",\"version\":\"1.14\",\"description\":\"SYS_CPLD\"},{\"name\":\"CPLD_LED\",\"version\":\"1.4\",\"description\":\"LED_CPLD\"},{\"name\":\"CPLD_FAN\",\"version\":\"1.8\",\"description\":\"FAN_CPLD\"}]}"
    >
  >
>

Arista 7060 Output:

root@<machine>:/# gnmi_get -xpath_target SHOW -xpath platform/firmware/status -target_addr <machine-ip> -logtostderr -insecure true
== getRequest:
prefix: <
  target: "SHOW"
>
path: <
  elem: <
    name: "platform"
  >
  elem: <
    name: "firmware"
  >
  elem: <
    name: "status"
  >
>
encoding: JSON_IETF

== getResponse:
notification: <
  timestamp: 1777962221007560374
  prefix: <
    target: "SHOW"
  >
  update: <
    path: <
      elem: <
        name: "platform"
      >
      elem: <
        name: "firmware"
      >
      elem: <
        name: "status"
      >
    >
    val: <
      json_ietf_val: "{\"chassis\":\"DCS-7060X6-64PE-B\",\"module\":\"N/A\",\"components\":[{\"name\":\"Aboot()\",\"version\":\"Aboot-norcal18-18.0.0-sodimm-41200278\",\"description\":\"Bootloader\"},{\"name\":\"Scd(addr=0000:03:00.0)\",\"version\":\"0x20014\",\"description\":\"System Control Device\"},{\"name\":\"RedstartSysCpld(addr=13-0023)\",\"version\":\"2.a\",\"description\":\"System CPLD\"},{\"name\":\"Scd(addr=0000:05:00.0)\",\"version\":\"0x20007\",\"description\":\"System Control Device\"}]}"
    >
  >
>

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@Deepak-Pandey
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Deepak-Pandey Deepak-Pandey marked this pull request as ready for review April 29, 2026 03:39
Comment thread show_client/helpers/platform_firmware_helper.go Outdated
@sharmavijay-ms
Copy link
Copy Markdown

Looks like chassis and module might be invariant across all rows.
Can you verify the o/p of fwutil command which python is using.
If chassis and model is coming only once they we should have json:

{
  "chassis": "SN5640",
  "module": "N/A",
  "components": [
    {
      "name": "ONIE",
      "version": "2024.08-5.3.0013-9600",
      "description": "ONIE - Open Network Install Environment"
    },
...
..
}

@Deepak-Pandey
Copy link
Copy Markdown
Author

Looks like chassis and module might be invariant across all rows. Can you verify the o/p of fwutil command which python is using. If chassis and model is coming only once they we should have json:

{
  "chassis": "SN5640",
  "module": "N/A",
  "components": [
    {
      "name": "ONIE",
      "version": "2024.08-5.3.0013-9600",
      "description": "ONIE - Open Network Install Environment"
    },
...
..
}

updated

@Deepak-Pandey
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Deepak-Pandey
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread show_client/helpers/platform_firmware_helper.go Outdated
@Deepak-Pandey
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Deepak-Pandey
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

sharmavijay-ms
sharmavijay-ms previously approved these changes May 5, 2026
Copy link
Copy Markdown

@sharmavijay-ms sharmavijay-ms left a comment

Choose a reason for hiding this comment

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

LGTM

@Deepak-Pandey
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Deepak-Pandey Deepak-Pandey merged commit 57fe237 into Azure:kubesonic May 5, 2026
10 checks passed
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.

4 participants