1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

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 <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-07-16 16:09:37 -07:00
parent cfc51ed18b
commit d07b5a9fbb

View 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