9fe128c8e8
Fixes #10020 Why I did it The platform api for parsing syseeprom information read from STATE DB has issue with parsing the value part that has whitespace in the middle. The current code assumes that the value part does not have whitespace. So everything after the whitespace will be ignored. The syseeprom values returned from platform API do not match the output of "show platform syseeprom". How I did it This change improved the regular expression for parsing syseeprom values to accommodate whitespaces in the value. How to verify it Locally updated the code on a dx010 device. Call the platform API: ``` >>> import sonic_platform >>> platform = sonic_platform.platform.Platform() >>> chassis = platform.get_chassis() >>> chassis.get_system_eeprom_info() {'0x21': 'DX010', '0x22': 'R0872-F0020-02', '0x23': 'DX010B2F030A27BY200002', '0x24': '00:E0:EC:E7:71:0F', '0x25': '11/03/2020 21:22:56', '0x26': '3', '0x27': 'Seastone', '0x28': 'RANGELEY', '0x29': '2014.08', '0x2A': '131', '0x2B': 'CELESTICA', '0x2C': 'THA', '0x2D': 'Celestica', '0x2E': '1.0.5', '0x2F': 'LB', '0xFD': '', '0xFE': '0xAAB39BDB'} ``` Signed-off-by: Xin Wang <xiwang5@microsoft.com> |
||
---|---|---|
.. | ||
barefoot | ||
broadcom | ||
cavium | ||
centec | ||
centec-arm64 | ||
checkout | ||
components | ||
generic | ||
innovium | ||
marvell | ||
marvell-arm64 | ||
marvell-armhf | ||
mellanox | ||
nephos | ||
p4 | ||
pddf | ||
template | ||
vs |