From c15cdf607c8a0baf87d0e3694814712442ead1e9 Mon Sep 17 00:00:00 2001 From: Tony Titus <49417625+tonytitus@users.noreply.github.com> Date: Wed, 30 Sep 2020 11:13:32 -0700 Subject: [PATCH] Show sflow interface to display all interfaces enabled for sflow (#1143) --- show/main.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/show/main.py b/show/main.py index c612f5df2edd..75e100207316 100755 --- a/show/main.py +++ b/show/main.py @@ -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: