def configure(self, **opts): # in a limited condition, we should not touch the nic config if (self.vlan and netinfo.operstate(self.name) == netinfo.OPERSTATE_UP and netinfo.ifaceUsed(self.name) and self.mtu <= netinfo.getMtu(self.name)): return self.configurator.configureNic(self, **opts)
def configure(self, **opts): # When the bond is up and we are not changing the configuration that # is already applied in any way, we can skip the configuring. if (self.vlan and self.name in netinfo.bondings() and netinfo.operstate(self.name) == netinfo.OPERSTATE_UP and netinfo.ifaceUsed(self.name) and self.mtu <= netinfo.getMtu(self.name) and self.areOptionsApplied() and frozenset(slave.name for slave in self.slaves) == frozenset( netinfo.slaves(self.name))): return self.configurator.configureBond(self, **opts)
def configure(self, **opts): # When the bond is up and we are not changing the configuration that # is already applied in any way, we can skip the configuring. if (self.vlan and self.name in netinfo.bondings() and netinfo.operstate(self.name) == netinfo.OPERSTATE_UP and netinfo.NetInfo().ifaceUsers(self.name) and self.mtu <= netinfo.getMtu(self.name) and self.areOptionsApplied() and frozenset(slave.name for slave in self.slaves) == frozenset(netinfo.slaves(self.name))): return self.configurator.configureBond(self, **opts)