-
Notifications
You must be signed in to change notification settings - Fork 809
[show] Add bgpraw to show run all #2537
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
Changes from 3 commits
be4aa05
4bc7e7b
bcdfe21
80d63dc
ed1cce3
a69380d
f5fc969
1070c59
3c5b6f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1384,7 +1384,12 @@ def runningconfiguration(): | |
| def all(verbose): | ||
| """Show full running configuration""" | ||
| cmd = "sonic-cfggen -d --print-data" | ||
| run_command(cmd, display_cmd=verbose) | ||
| output = json.loads(run_command(cmd, display_cmd=verbose, return_cmd=True)) | ||
|
||
| if not multi_asic.is_multi_asic(): | ||
| bgpraw_cmd = "sudo {} -c 'show running-config'".format(constants.RVTYSH_COMMAND) | ||
|
||
| bgpraw = run_command(bgpraw_cmd, display_cmd=verbose, return_cmd=True) | ||
|
||
| output['bgpraw'] = bgpraw | ||
wen587 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| click.echo(json.dumps(output, indent=4)) | ||
wen587 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| # 'acl' subcommand ("show runningconfiguration acl") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the output of run_command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the format of output or bgpraw in output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geoffrey@vm-04:~$ python3
Python 3.6.9 (default, Nov 25 2022, 14:10:45)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe that should be checked in sonic-cfggen?
sonic-cfggen guarantees that
--print-datacould be json.dump.