Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue of partially parsing syseeprom value (#10020) #10276

Merged
merged 1 commit into from
Mar 21, 2022
Merged

Fix issue of partially parsing syseeprom value (#10020) #10276

merged 1 commit into from
Mar 21, 2022

Conversation

qnos
Copy link
Contributor

@qnos qnos commented Mar 18, 2022

Signed-off-by: Eric Zhu erzhu@celestica.com

Fix #10020

Why I did it

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" on dx010 and e1031 device.

How I did it

This change improved the regular expression for parsing syseeprom values to accommodate whitespaces in the value.
PR 10021 provides the solution, but committed to the wrong place for dx010 and e1031.

How to verify it

Compile the sonic_platform wheel for dx010, then upload to device and install the wheel, verify the platform eeprom API.

>>> import sonic_platform
>>> platform = sonic_platform.platform.Platform()
>>> chassis = platform.get_chassis()
>>> chassis.get_system_eeprom_info()
{'0x21': 'DX010', '0x22': 'R0872-F0010-01', '0x23': 'DX010B2F108711LK100031', '0x24': '00:E0:EC:B9:28:10', '0x25': '10/23/2018 17:33:54', '0x26': '10', '0x27': 'Seastone', '0x28': 'RANGELEY', '0x29': '2014.08', '0x2A': '131', '0x2B': 'CELESTICA', '0x2C': 'CHN', '0x2D': 'Celestica', '0x2E': '1.1.1', '0x2F': 'LB', '0xFD': '', '0xFE': '0xA7CD2590'}
>>>

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)

  * fix issue #10020 for celestica e1031 device
  * fix issue #10020 for celestica seastone device

Signed-off-by: Eric Zhu <erzhu@celestica.com>
@sujinmkang sujinmkang merged commit 4caa887 into sonic-net:master Mar 21, 2022
@Blueve
Copy link
Contributor

Blueve commented Mar 22, 2022

Add Request from 202012 branch label

qiluo-msft pushed a commit that referenced this pull request Mar 25, 2022
Why I did it
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" on dx010 and e1031 device.

How I did it
This change improved the regular expression for parsing syseeprom values to accommodate whitespaces in the value.
PR 10021 provides the solution, but committed to the wrong place for dx010 and e1031.

How to verify it
Compile the sonic_platform wheel for dx010, then upload to device and install the wheel, verify the platform eeprom API.

Signed-off-by: Eric Zhu <erzhu@celestica.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Celestica] Platform API partially parse eeprom value with whitespace in middle
4 participants