def configureNic(self, nic, **opts): self.configApplier.addNic(nic, **opts) self._addSourceRoute(nic) if nic.bond is None: if not vlans.is_vlanned(nic.name): ifdown(nic.name) _ifup(nic)
def configureBond(self, bond, **opts): if not self.owned_device(bond.name): IfcfgAcquire.acquire_device(bond.name) self.configApplier.addBonding(bond, self.net_info, **opts) if not vlans.is_vlanned(bond.name): for slave in bond.slaves: ifdown(slave.name) for slave in bond.slaves: slave.configure(**opts) self._addSourceRoute(bond) _ifup(bond) # When acquiring the device from NM, it may take a few seconds until # the bond is released by NM and loaded through initscripts. # Giving it a chance to come up before continuing. with waitfor.waitfor_linkup(bond.name): pass bond_attr = { 'options': bond.options, 'nics': sorted(s.name for s in bond.slaves), 'switch': 'legacy' } if bond.hwaddr: bond_attr['hwaddr'] = bond.hwaddr self.runningConfig.setBonding(bond.name, bond_attr)
def configureNic(self, nic, **opts): self.configApplier.addNic(nic, **opts) self._addSourceRoute(nic) if nic.bond is None: if not vlans.is_vlanned(nic.name): ifdown(nic.name) _ifup(nic)
def configureNic(self, nic, **opts): if not self.owned_device(nic.name): IfcfgAcquire.acquire_device(nic.name) self.configApplier.addNic(nic, **opts) self._addSourceRoute(nic) if nic.bond is None: if not vlans.is_vlanned(nic.name): ifdown(nic.name) _ifup(nic)
def configureNic(self, nic, **opts): if not self.owned_device(nic.name): IfcfgAcquire.acquire_device(nic.name) self.configApplier.addNic(nic, self.net_info, **opts) self._addSourceRoute(nic) if nic.bond is None: if not vlans.is_vlanned(nic.name): ifdown(nic.name) _ifup(nic)
def configureNic(self, nic, **opts): if not self.owned_device(nic.name): self.normalize_device_filename(nic.name) self.configApplier.addNic(nic, **opts) self._addSourceRoute(nic) if nic.bond is None: if not vlans.is_vlanned(nic.name): ifdown(nic.name) _ifup(nic)
def configureBond(self, bond, **opts): self.configApplier.addBonding(bond, **opts) if not vlans.is_vlanned(bond.name): for slave in bond.slaves: ifdown(slave.name) for slave in bond.slaves: slave.configure(**opts) self._addSourceRoute(bond) _ifup(bond) if self.unifiedPersistence: self.runningConfig.setBonding( bond.name, {'options': bond.options, 'nics': [slave.name for slave in bond.slaves], 'switch': 'legacy'})
def configureBond(self, bond, **opts): if not self.owned_device(bond.name): IfcfgAcquire.acquire_device(bond.name) self.configApplier.addBonding(bond, **opts) if not vlans.is_vlanned(bond.name): for slave in bond.slaves: ifdown(slave.name) for slave in bond.slaves: slave.configure(**opts) self._addSourceRoute(bond) _ifup(bond) if self.unifiedPersistence: self.runningConfig.setBonding( bond.name, {"options": bond.options, "nics": [slave.name for slave in bond.slaves], "switch": "legacy"} )
def configureBond(self, bond, **opts): self.configApplier.addBonding(bond, **opts) if not vlans.is_vlanned(bond.name): for slave in bond.slaves: ifdown(slave.name) for slave in bond.slaves: slave.configure(**opts) self._addSourceRoute(bond) _ifup(bond) if self.unifiedPersistence: self.runningConfig.setBonding( bond.name, { 'options': bond.options, 'nics': [slave.name for slave in bond.slaves], 'switch': 'legacy' })
def configureBond(self, bond, **opts): if not self.owned_device(bond.name): IfcfgAcquire.acquire_device(bond.name) self.configApplier.addBonding(bond, self.net_info, **opts) if not vlans.is_vlanned(bond.name): for slave in bond.slaves: ifdown(slave.name) for slave in bond.slaves: slave.configure(**opts) self._addSourceRoute(bond) _ifup(bond) # When acquiring the device from NM, it may take a few seconds until # the bond is released by NM and loaded through initscripts. # Giving it a chance to come up before continuing. with waitfor.waitfor_linkup(bond.name): pass self.runningConfig.setBonding( bond.name, {'options': bond.options, 'nics': sorted(s.name for s in bond.slaves), 'switch': 'legacy'})