sonic-buildimage/platform/broadcom/sonic-platform-modules-cel
Xin Wang 179c140ec8 Fix issue of parsing syseeprom value with whitespace in middle (#10021)
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>
2022-02-23 22:46:38 +00:00
..
debian [202012][device/celestica]: Fix failed test cases of Haliburton platform API (#8297) 2021-08-15 00:00:08 -07:00
dx010 enable the emc2305 fan controller and NCP power controller 30ms timeout mechanism (#8138) 2021-08-12 07:09:53 +00:00
haliburton [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-07-20 09:04:27 +00:00
seastone2 [device/celestica]: Implement Seastone2 platform API (#5080) 2020-09-09 10:32:56 -07:00
services Fix issue of parsing syseeprom value with whitespace in middle (#10021) 2022-02-23 22:46:38 +00:00
silverstone [devices] Celeatica Silverstone add IPMI platform sensor read. (#3591) 2019-11-07 22:02:52 -08:00
.gitignore [build]: add .gitignore for cel, delta and inventec 2018-08-11 09:09:03 +00:00
LICENSE [platform]: incorporate sonic-platform-modules-cel into sonic buildimage repo 2018-08-11 09:09:03 +00:00
README.md [Celestica/Seastone2] Add support Seastone2 device and platform (#3761) 2020-01-15 18:42:09 -08:00

platform drivers of Celestica network switchs for the SONiC project