sonic-buildimage/platform
Xin Wang 9fe128c8e8
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 10:33:34 +08:00
..
barefoot Add support for Accton wedge100bf_32qs platform to SONiC master (#9257) 2022-02-18 15:21:14 +05:30
broadcom Fix issue of parsing syseeprom value with whitespace in middle (#10021) 2022-02-23 10:33:34 +08:00
cavium [dockers] change RPC, DBG dockers version: put RPG, DBG sign in build metadata part of the version (#8920) 2021-11-01 19:02:57 +02:00
centec [centec][build] Fix docker-syncd-centec-rpc build fail (#9612) 2022-01-05 10:44:38 -08:00
centec-arm64 [centec][build] Fix docker-syncd-centec-rpc build fail (#9612) 2022-01-05 10:44:38 -08:00
checkout Platform/cisco-8000 module for sonic-buildimage (#8172) 2021-08-06 09:11:54 +08:00
components [docker-gbsync-credo]: Don't install libprotobuf-dev and its dependencies 2022-01-06 09:26:55 -08:00
generic [dockers] Rename 'docker-snmp-sv2' to 'docker-snmp' (#4699) 2020-06-11 16:04:23 -07:00
innovium [SFP-Refactor] Modify transceiver key name (#9447) 2021-12-09 12:38:45 +05:30
marvell [Marvell] Move amd64 & arm64 syncd to buster (#8869) 2021-11-04 07:44:33 -07:00
marvell-arm64 [marvell-arm64]: Fix typo at _UNINSTALL which will block building (#9267) 2021-11-17 21:00:21 -08:00
marvell-armhf [Build]: Fix marvell sai package version parsing issue 2022-02-19 12:16:50 +08:00
mellanox [Mellanox] Upgrade ASIC FW tool to 4.18.1-16 (#9981) 2022-02-14 10:39:47 +02:00
nephos [dockers] change RPC, DBG dockers version: put RPG, DBG sign in build metadata part of the version (#8920) 2021-11-01 19:02:57 +02:00
p4 Add support to start fdbsyncd when orchagent docker starts (#5979) 2020-12-24 18:36:01 -08:00
pddf [pddf]: Adding pre_pddf_init script in the service file (#7834) 2022-01-02 22:28:48 -08:00
template For syncd, specify that they're Buster-based containers in the template file instead of the individual container definitions 2021-11-10 15:27:22 -08:00
vs [PTF-SAIv2]Add ptf docker for sai-ptf (saiv2) (#9729) 2022-02-18 01:48:50 -08:00