Exemple #1
0
 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 link_vlan.is_base_device(nic.name):
             if nic.bridge is not None:
                 dhclient.stop(nic.name, 4)
                 dhclient.stop(nic.name, 6)
                 ipwrapper.linkSet(nic.name, ['down'])
             else:
                 ifdown(nic.name)
         _ifup(nic)
Exemple #2
0
def _drop_dhcp_config(iface):
    dhclient.stop(iface, 4)
    dhclient.stop(iface, 6)
Exemple #3
0
 def ifdown(self, iface):
     ipwrapper.linkSet(iface.name, ['down'])
     dhclient.stop(iface.name)
Exemple #4
0
def dhclient_run(iface, family=4):
    dhclient.run(iface, family, blocking_dhcp=True)
    try:
        yield
    finally:
        dhclient.stop(iface, family)
Exemple #5
0
 def ifdown(self, iface):
     with self.ip.interfaces[iface.name] as i:
         i.down()
     dhclient.stop(iface.name)
Exemple #6
0
def dhclient_run(iface):
    dhclient.run(iface, blocking_dhcp=True)
    try:
        yield
    finally:
        dhclient.stop(iface)
Exemple #7
0
def _drop_dhcp_config(iface):
    dhclient.stop(iface, 4)
    dhclient.stop(iface, 6)
Exemple #8
0
 def ifdown(self, iface):
     with self.ip.interfaces[iface.name] as i:
         i.down()
     dhclient.stop(iface.name)
Exemple #9
0
 def ifdown(self, iface):
     ipwrapper.linkSet(iface.name, ['down'])
     dhclient.stop(iface.name)