]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
addons: ethtool: ignore logical interfaces with link_kind
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Sat, 16 Jul 2016 23:09:37 +0000 (16:09 -0700)
committerRoopa Prabhu <roopa@cumulusnetworks.com>
Sat, 16 Jul 2016 23:22:49 +0000 (16:22 -0700)
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 <roopa@cumulusnetworks.com>
addons/ethtool.py

index ae2c50304ec02a496b70cd832b353263ae85bc9c..c2d4771b1bd4cc04eb5e12b0ed7e8a77e5b0c125 100644 (file)
@@ -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