Skip to content

Commit

Permalink
[show/main.py]: New Sonic CLI Command "show ndp" to show IPV6 Neighbo…
Browse files Browse the repository at this point in the history
…urs (sonic-net#261)

1.) Added "show ndp" to show ipv6 neighbours.
This calls "/bin/ip -6 neigh show"

Signed-off-by: [email protected]
  • Loading branch information
Praveen Chaudhary authored and lguohan committed Jun 26, 2018
1 parent 3db4275 commit 3ae2cdf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,21 @@ def arp(ipaddress, verbose):

run_command(cmd, display_cmd=verbose)

#
# 'ndp' command ("show ndp")
#

@cli.command()
@click.argument('ip6address', required=False)
@click.option('--verbose', is_flag=True, help="Enable verbose output")
def ndp(ip6address):
"""Show IPv6 Neighbour table"""
cmd = "/bin/ip -6 neigh show"

if ip6address is not None:
cmd += ' {}'.format(ip6address)

run_command(cmd, display_cmd=verbose)

#
# 'interfaces' group ("show interfaces ...")
Expand Down

0 comments on commit 3ae2cdf

Please sign in to comment.