Esempio n. 1
0
 def configureNic(self, nic, **opts):
     self.configApplier.addNic(nic, **opts)
     self._addSourceRoute(nic)
     if nic.bond is None:
         if not netinfo.isVlanned(nic.name):
             ifdown(nic.name)
         ifup(nic.name, nic.ipConfig. async)
Esempio n. 2
0
 def configureNic(self, nic, **opts):
     self.configApplier.addNic(nic, **opts)
     self._addSourceRoute(nic)
     if nic.bond is None:
         if not netinfo.isVlanned(nic.name):
             ifdown(nic.name)
         _ifup(nic)
Esempio n. 3
0
 def configureNic(self, nic, **opts):
     ipaddr, netmask, gateway, bootproto, async = nic.getIpConfig()
     self.configApplier.addNic(nic, **opts)
     self._addSourceRoute(nic, ipaddr, netmask, gateway, bootproto)
     if nic.bond is None:
         if not netinfo.isVlanned(nic.name):
             ifdown(nic.name)
         ifup(nic.name, async)
Esempio n. 4
0
 def configureNic(self, nic, **opts):
     ipaddr, netmask, gateway, bootproto, async, _ = nic.getIpConfig()
     self.configApplier.addNic(nic, **opts)
     self._addSourceRoute(nic, ipaddr, netmask, gateway, bootproto)
     if nic.bond is None:
         if not netinfo.isVlanned(nic.name):
             ifdown(nic.name)
         ifup(nic.name, async)
Esempio n. 5
0
 def configureBond(self, bond, **opts):
     self.configApplier.addBonding(bond, **opts)
     if not netinfo.isVlanned(bond.name):
         for slave in bond.slaves:
             ifdown(slave.name)
     for slave in bond.slaves:
         slave.configure(**opts)
     self._addSourceRoute(bond)
     ifup(bond.name, bond.ipConfig.async)
Esempio n. 6
0
 def configureNic(self, nic, bridge=None, bonding=None, **opts):
     ipaddr, netmask, gateway, bootproto, async = nic.getIpConfig()
     self.configWriter.addNic(nic.name, bonding=bonding, bridge=bridge,
                              mtu=nic.mtu, ipaddr=ipaddr,
                              netmask=netmask, gateway=gateway,
                              bootproto=bootproto, **opts)
     if not bonding:
         if not netinfo.isVlanned(nic.name):
             ifdown(nic.name)
         ifup(nic.name, async)
Esempio n. 7
0
 def configureBond(self, bond, **opts):
     ipaddr, netmask, gateway, bootproto, async = bond.getIpConfig()
     self.configApplier.addBonding(bond, **opts)
     if not netinfo.isVlanned(bond.name):
         for slave in bond.slaves:
             ifdown(slave.name)
     for slave in bond.slaves:
         slave.configure(**opts)
     self._addSourceRoute(bond, ipaddr, netmask, gateway, bootproto)
     ifup(bond.name, async)
Esempio n. 8
0
 def configureBond(self, bond, **opts):
     ipaddr, netmask, gateway, bootproto, async, _ = bond.getIpConfig()
     self.configApplier.addBonding(bond, **opts)
     if not netinfo.isVlanned(bond.name):
         for slave in bond.slaves:
             ifdown(slave.name)
     for slave in bond.slaves:
         slave.configure(**opts)
     self._addSourceRoute(bond, ipaddr, netmask, gateway, bootproto)
     ifup(bond.name, async)
Esempio n. 9
0
 def configureBond(self, bond, **opts):
     self.configApplier.addBonding(bond, **opts)
     if not netinfo.isVlanned(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]})
Esempio n. 10
0
 def configureBond(self, bond, bridge=None, **opts):
     ipaddr, netmask, gateway, bootproto, async = bond.getIpConfig()
     self.configWriter.addBonding(bond.name, bridge=bridge,
                                  bondingOptions=bond.options,
                                  mtu=bond.mtu, ipaddr=ipaddr,
                                  netmask=netmask, gateway=gateway,
                                  bootproto=bootproto, **opts)
     if not netinfo.isVlanned(bond.name):
         for slave in bond.slaves:
             ifdown(slave.name)
     for slave in bond.slaves:
         slave.configure(bonding=bond.name, **opts)
     ifup(bond.name, async)
Esempio n. 11
0
 def configureBond(self, bond, **opts):
     self.configApplier.addBonding(bond, **opts)
     if not netinfo.isVlanned(bond.name):
         for slave in bond.slaves:
             ifdown(slave.name)
     for slave in bond.slaves:
         slave.configure(**opts)
     self._addSourceRoute(bond)
     ifup(bond.name, bond.ipConfig. async)
     if self.unifiedPersistence:
         self.runningConfig.setBonding(
             bond.name, {
                 'options': bond.options,
                 'nics': [slave.name for slave in bond.slaves]
             })