Skip to content

Commit

Permalink
Changing "show runningconfiguration interface" to "show runningconfig…
Browse files Browse the repository at this point in the history
…uration ports" (sonic-net#600)

Signed-off-by: Vasant Patil <vapatil@linkedin.com>
  • Loading branch information
vasant17 authored and jleveque committed Aug 13, 2019
1 parent 81fe2bd commit 48e0e1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2958,7 +2958,7 @@ This sub-section explains the show commands for displaying the running configura
4) snmp
5) all
6) acl
7) interface
7) ports

**show runningconfiguration all**

Expand Down Expand Up @@ -3038,21 +3038,21 @@ This command displays the running configuration of the snmp module.
admin@sonic:~$ show runningconfiguration acl
```

**show runningconfiguration interface <interfacename>**
**show runningconfiguration ports <portname>**

This command displays the running configuration of the ports

- Usage:
show runningconfiguration interface <interfacename>
show runningconfiguration ports <portname>


- Example:
```
admin@sonic:~$ show runningconfiguration interface
admin@sonic:~$ show runningconfiguration ports
```

```
admin@sonic:~$ show runningconfiguration interface <interfacename>
admin@sonic:~$ show runningconfiguration ports <portname>
```

Go Back To [Beginning of the document](#SONiC-COMMAND-LINE-INTERFACE-GUIDE) or [Beginning of this section](#Startup--Running-Configuration)
Expand Down
12 changes: 6 additions & 6 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1420,16 +1420,16 @@ def acl(verbose):
run_command(cmd, display_cmd=verbose)


# 'interface' subcommand ("show runningconfiguration interface <interfacename>")
# 'ports' subcommand ("show runningconfiguration ports <portname>")
@runningconfiguration.command()
@click.argument('interfacename', required=False)
@click.argument('portname', required=False)
@click.option('--verbose', is_flag=True, help="Enable verbose output")
def interface(interfacename, verbose):
"""Show port running configuration"""
def ports(interfacename, verbose):
"""Show ports running configuration"""
cmd = "sonic-cfggen -d --var-json PORT"

if interfacename is not None:
cmd += " {0} {1}".format("--interface", interfacename)
if portname is not None:
cmd += " {0} {1}".format("--port", portname)

run_command(cmd, display_cmd=verbose)

Expand Down

0 comments on commit 48e0e1b

Please sign in to comment.