From 7b46397336a978836d4bebc094e6586f05e24ab2 Mon Sep 17 00:00:00 2001 From: AmitKaushik7 <52193450+AmitKaushik7@users.noreply.github.com> Date: Thu, 3 Oct 2019 01:39:12 +0530 Subject: [PATCH] [pfcwd] Apply pfcwd config only on physical ports (#640) --- pfcwd/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pfcwd/main.py b/pfcwd/main.py index 21b5559fa0cd..b56760d80bae 100644 --- a/pfcwd/main.py +++ b/pfcwd/main.py @@ -42,7 +42,13 @@ def get_all_queues(db): return natsorted(queue_names.keys()) def get_all_ports(db): - port_names = db.get_all(db.COUNTERS_DB, 'COUNTERS_PORT_NAME_MAP') + all_port_names = db.get_all(db.COUNTERS_DB, 'COUNTERS_PORT_NAME_MAP') + + # Get list of physical ports + port_names = {} + for i in all_port_names: + if i.startswith('Ethernet'): + port_names[i]= all_port_names[i] return natsorted(port_names.keys()) def get_server_facing_ports(db):