From d07b5a9fbb73ad22d3f35cd6b6bb0a6ce5eebfc6 Mon Sep 17 00:00:00 2001 From: Roopa Prabhu Date: Sat, 16 Jul 2016 16:09:37 -0700 Subject: [PATCH] addons: ethtool: ignore logical interfaces with link_kind Ticket: CM-11517 Reviewed By: julien, nikhil, jtoppins Testing Done: ethtool sanity test ethtool module should really care only about physical interfaces. so, this patch makes ethtool module ignore all logical interfaces, ie interfaces with link_kind set. Signed-off-by: Roopa Prabhu --- addons/ethtool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/ethtool.py b/addons/ethtool.py index ae2c503..c2d4771 100644 --- a/addons/ethtool.py +++ b/addons/ethtool.py @@ -250,8 +250,6 @@ class ethtool(moduleBase,utilsBase): def _query(self, ifaceobj, **kwargs): """ add default policy attributes supported by the module """ - if ifaceobj.link_kind: - return for attr in ['speed', 'duplex', 'autoneg']: if ifaceobj.get_attr_value_first('link-%s'%attr): continue @@ -294,6 +292,8 @@ class ethtool(moduleBase,utilsBase): of interfaces. status is success if the running state is same as user required state in ifaceobj. error otherwise. """ + if ifaceobj.link_kind: + return op_handler = self._run_ops.get(operation) if not op_handler: return