Fix issue of partially parsing syseeprom value (#10020)#10276
Merged
sujinmkang merged 1 commit intosonic-net:masterfrom Mar 21, 2022
qnos:cel-parse-eeprom-issue-fix
Merged
Fix issue of partially parsing syseeprom value (#10020)#10276sujinmkang merged 1 commit intosonic-net:masterfrom qnos:cel-parse-eeprom-issue-fix
sujinmkang merged 1 commit intosonic-net:masterfrom
qnos:cel-parse-eeprom-issue-fix
Conversation
sujinmkang
approved these changes
Mar 21, 2022
Contributor
|
Add |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)