Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Stepan Blyshchak <[email protected]>
  • Loading branch information
stepanblyschak committed Feb 10, 2021
1 parent 681241d commit 63f5e6e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion show/vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_vlan_ports_tagging(ctx, vlan):
_, _, vlan_ports_data = cfg
vlan_ports_tagging = []
# Here natsorting is important in relation to another
# column which prints port tagging mode.
# column which prints vlan ports.
# If we sort both in the same way using same keys
# we will result in right order in both columns.
# This should be fixed by cli code autogeneration tool
Expand Down Expand Up @@ -106,6 +106,14 @@ class VlanBrief:
("Proxy ARP", get_proxy_arp)
]

@classmethod
def register_column(cls, column_name, callback):
""" Adds a new column to "vlan brief" output.
Expected to be used from plugins code to extend
this command with additional VLAN fields. """

cls.COLUMNS.append((column_name, callback))


@vlan.command()
@click.option('--verbose', is_flag=True, help="Enable verbose output")
Expand Down

0 comments on commit 63f5e6e

Please sign in to comment.