Skip to content

Commit 924a76d

Browse files
authored
[show] Rename 'show session' to 'show mirror session' (#235)
1 parent 3f2d7bb commit 924a76d

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

show/main.py

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -865,10 +865,17 @@ def tacacs():
865865

866866

867867
#
868-
# 'session' command ###
868+
# 'mirror' group ###
869869
#
870870

871-
@cli.command()
871+
@cli.group(cls=AliasedGroup, default_if_no_args=False)
872+
def mirror():
873+
"""Show mirroring (Everflow) information"""
874+
pass
875+
876+
877+
# 'session' subcommand ("show mirror session")
878+
@mirror.command()
872879
@click.argument('session_name', required=False)
873880
def session(session_name):
874881
"""Show existing everflow sessions"""
@@ -888,39 +895,34 @@ def acl():
888895
pass
889896

890897

891-
#
892-
# 'acl table' command ###
893-
#
894-
898+
# 'rule' subcommand ("show acl rule")
895899
@acl.command()
896900
@click.argument('table_name', required=False)
897-
def table(table_name):
898-
"""Show existing ACL tables"""
901+
@click.argument('rule_id', required=False)
902+
def rule(table_name, rule_id):
903+
"""Show existing ACL rules"""
899904
if table_name is None:
900905
table_name = ""
901906

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

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

905-
#
906-
# 'acl rule' command ###
907-
#
908912

913+
# 'table' subcommand ("show acl table")
909914
@acl.command()
910915
@click.argument('table_name', required=False)
911-
@click.argument('rule_id', required=False)
912-
def rule(table_name, rule_id):
913-
"""Show existing ACL rules"""
916+
def table(table_name):
917+
"""Show existing ACL tables"""
914918
if table_name is None:
915919
table_name = ""
916920

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

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

922924
#
923-
# 'session' command (show ecn)
925+
# 'ecn' command ("show ecn")
924926
#
925927
@cli.command('ecn')
926928
def ecn():

0 commit comments

Comments
 (0)