예제 #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)
예제 #2
0
파일: configurator.py 프로젝트: minqf/vdsm
def _drop_dhcp_config(iface):
    dhclient.stop(iface, 4)
    dhclient.stop(iface, 6)
예제 #3
0
 def ifdown(self, iface):
     ipwrapper.linkSet(iface.name, ['down'])
     dhclient.stop(iface.name)
예제 #4
0
def dhclient_run(iface, family=4):
    dhclient.run(iface, family, blocking_dhcp=True)
    try:
        yield
    finally:
        dhclient.stop(iface, family)
예제 #5
0
 def ifdown(self, iface):
     with self.ip.interfaces[iface.name] as i:
         i.down()
     dhclient.stop(iface.name)
예제 #6
0
def dhclient_run(iface):
    dhclient.run(iface, blocking_dhcp=True)
    try:
        yield
    finally:
        dhclient.stop(iface)
예제 #7
0
파일: configurator.py 프로젝트: nirs/vdsm
def _drop_dhcp_config(iface):
    dhclient.stop(iface, 4)
    dhclient.stop(iface, 6)
예제 #8
0
 def ifdown(self, iface):
     with self.ip.interfaces[iface.name] as i:
         i.down()
     dhclient.stop(iface.name)
예제 #9
0
파일: iproute2.py 프로젝트: rexhsu/vdsm
 def ifdown(self, iface):
     ipwrapper.linkSet(iface.name, ['down'])
     dhclient.stop(iface.name)