Skip to content

Commit

Permalink
Show sflow interface to display all interfaces enabled for sflow (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytitus authored Sep 30, 2020
1 parent 2cd7893 commit c15cdf6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1624,13 +1624,10 @@ def show_sflow_interface(config_db):
click.echo("No ports configured")
return

idx_to_port_map = {int(port_tbl[name]['index']): name for name in
port_tbl.keys()}
click.echo("\nsFlow interface configurations")
header = ['Interface', 'Admin State', 'Sampling Rate']
body = []
for idx in sorted(idx_to_port_map.keys()):
pname = idx_to_port_map[idx]
for pname in natsorted(port_tbl.keys()):
intf_key = 'SFLOW_SESSION_TABLE:' + pname
sess_info = sess_db.get_all(sess_db.APPL_DB, intf_key)
if sess_info is None:
Expand Down

0 comments on commit c15cdf6

Please sign in to comment.