Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[show] Add bgpraw to show run all (sonic-net#2537)
#### What I did Add bgpraw output to `show runningconfiguration all` ``` Requirements: 1. current `show runningconfig` will print all the ConfigDB in a json format, we need to add a new key-value into the json output "bgpraw" with a long string value 2. The long string value should be the output of `vtysh -c "show run"`. It is normally multiline string, may include special characters like \". Need to make sure the escaping properly 3. We do not need to insert the key-value into ConfigDB is not existing there 4. If ConfigDB already has the key-value, we do not need to override it by vtysh command output 5. Not break multi-asic use ``` #### How I did it Generate bgpraw output then append it to `show runnningconfiguration all`'s output #### How to verify it Mannual test #### Previous command output (if the output of a command-line utility has changed) ``` admin@vlab-01:~$ show run all { "ACL_TABLE": { ...... "WRED_PROFILE": { "AZURE_LOSSLESS": { "ecn": "ecn_all", "green_drop_probability": "5", "green_max_threshold": "2097152", "green_min_threshold": "1048576", "red_drop_probability": "5", "red_max_threshold": "2097152", "red_min_threshold": "1048576", "wred_green_enable": "true", "wred_red_enable": "true", "wred_yellow_enable": "true", "yellow_drop_probability": "5", "yellow_max_threshold": "2097152", "yellow_min_threshold": "1048576" } } } ``` #### New command output (if the output of a command-line utility has changed) ``` admin@vlab-01:~$ show run all { "ACL_TABLE": { ...... "WRED_PROFILE": { "AZURE_LOSSLESS": { "ecn": "ecn_all", "green_drop_probability": "5", "green_max_threshold": "2097152", "green_min_threshold": "1048576", "red_drop_probability": "5", "red_max_threshold": "2097152", "red_min_threshold": "1048576", "wred_green_enable": "true", "wred_red_enable": "true", "wred_yellow_enable": "true", "yellow_drop_probability": "5", "yellow_max_threshold": "2097152", "yellow_min_threshold": "1048576" } }, "bgpraw": "Building configuration...\n\nCurrent configuration......end\n" } ```
- Loading branch information