Skip to content

Commit

Permalink
[show] Rename 'show session' to 'show mirror session' (sonic-net#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
jleveque authored Apr 10, 2018
1 parent 3f2d7bb commit 924a76d
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,17 @@ def tacacs():


#
# 'session' command ###
# 'mirror' group ###
#

@cli.command()
@cli.group(cls=AliasedGroup, default_if_no_args=False)
def mirror():
"""Show mirroring (Everflow) information"""
pass


# 'session' subcommand ("show mirror session")
@mirror.command()
@click.argument('session_name', required=False)
def session(session_name):
"""Show existing everflow sessions"""
Expand All @@ -888,39 +895,34 @@ def acl():
pass


#
# 'acl table' command ###
#

# 'rule' subcommand ("show acl rule")
@acl.command()
@click.argument('table_name', required=False)
def table(table_name):
"""Show existing ACL tables"""
@click.argument('rule_id', required=False)
def rule(table_name, rule_id):
"""Show existing ACL rules"""
if table_name is None:
table_name = ""

run_command("acl-loader show table {}".format(table_name))
if rule_id is None:
rule_id = ""

run_command("acl-loader show rule {} {}".format(table_name, rule_id))

#
# 'acl rule' command ###
#

# 'table' subcommand ("show acl table")
@acl.command()
@click.argument('table_name', required=False)
@click.argument('rule_id', required=False)
def rule(table_name, rule_id):
"""Show existing ACL rules"""
def table(table_name):
"""Show existing ACL tables"""
if table_name is None:
table_name = ""

if rule_id is None:
rule_id = ""
run_command("acl-loader show table {}".format(table_name))

run_command("acl-loader show rule {} {}".format(table_name, rule_id))

#
# 'session' command (show ecn)
# 'ecn' command ("show ecn")
#
@cli.command('ecn')
def ecn():
Expand Down

0 comments on commit 924a76d

Please sign in to comment.