sonic-platform-daemons icon indicating copy to clipboard operation
sonic-platform-daemons copied to clipboard

Add serial_num field for chassis info in STATE_DB

Open pettershao-ragilenetworks opened this issue 2 years ago • 1 comments

upload serial number to the STATE_DB under the CHASSIS_INFO table as a new chassis hardware information for users

Description

Expose serial number to user space so that CLI utilities have access to it.

Motivation and Context

The "show version" command will get "serial" field value in STATE_DB under the CHASSIS_INFO table as the "Serial Number" display. However, the platform API "get_serial" is suppose to be used to get the service tag of the chassis instead of the actual serial number. I made this change in order that the actual serial number can be exposed to SONiC user and the CLI utilities can have access to it.

How Has This Been Tested?

After the merge of the related CLI utilities changes, use "show version" to check the "Serial Number" field

Additional Information (Optional)

"show version" command result before this change: image "show version" command result after this change image

@jleveque @alexrallen please help review this pr.