Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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