sonic-utilities
sonic-utilities copied to clipboard
[config db] Trim garbage charactor in "DEVICE_METADATA" of config db
This is to prevent a user error in ADO: 28004860 where there was an extra "\n" at the end of mac, in "DEVICE_METADATA" section.
What I did
- the garbage char could be generated with "load_minigraph" if '-override-config' is specified, and if golden_config has garbage char.
- it could also be introduced by "config reload"
How I did it
in both cases, add the strip method for "mac" as well as "platform" whenever the DEVICE_METADATA tends to be modified. to trim the extra "\n"
How to verify it
- add an extra "\n" at end of mac, in config db
- did config reload, garbage char exists
- apply changes in this PR