Skip to content

Commit c15cdf6

Browse files
authored
Show sflow interface to display all interfaces enabled for sflow (#1143)
1 parent 2cd7893 commit c15cdf6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

show/main.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1624,13 +1624,10 @@ def show_sflow_interface(config_db):
16241624
click.echo("No ports configured")
16251625
return
16261626

1627-
idx_to_port_map = {int(port_tbl[name]['index']): name for name in
1628-
port_tbl.keys()}
16291627
click.echo("\nsFlow interface configurations")
16301628
header = ['Interface', 'Admin State', 'Sampling Rate']
16311629
body = []
1632-
for idx in sorted(idx_to_port_map.keys()):
1633-
pname = idx_to_port_map[idx]
1630+
for pname in natsorted(port_tbl.keys()):
16341631
intf_key = 'SFLOW_SESSION_TABLE:' + pname
16351632
sess_info = sess_db.get_all(sess_db.APPL_DB, intf_key)
16361633
if sess_info is None:

0 commit comments

Comments
 (0)