예제 #1
0
파일: ip_lib.py 프로젝트: zhunzhong/neutron
def delete_network_namespace(namespace, **kwargs):
    """Delete a network namespace.

    :param namespace: The name of the namespace to delete
    :param kwargs: Callers add any filters they use as kwargs
    """
    privileged.remove_netns(namespace, **kwargs)
예제 #2
0
파일: ip_lib.py 프로젝트: huntxu/neutron
def delete_network_namespace(namespace, **kwargs):
    """Delete a network namespace.

    :param namespace: The name of the namespace to delete
    :param kwargs: Callers add any filters they use as kwargs
    """
    privileged.remove_netns(namespace, **kwargs)
예제 #3
0
 def _cleanup(self):
     if self.namespace:
         priv_ip_lib.remove_netns(self.namespace)
     else:
         for device in (self.device_vxlan, self.device):
             try:
                 priv_ip_lib.delete_interface(device, None)
             except priv_ip_lib.NetworkInterfaceNotFound:
                 pass
예제 #4
0
 def _cleanup(self):
     self.proc.stop(kill_timeout=10, kill_signal=signal.SIGTERM)
     if self.namespace:
         priv_ip_lib.remove_netns(self.namespace)
     else:
         for device in self.devices:
             try:
                 priv_ip_lib.delete_interface(device, self.namespace)
             except priv_ip_lib.NetworkInterfaceNotFound:
                 pass
예제 #5
0
 def _remove_ns(self, namespace):
     priv_ip_lib.remove_netns(namespace)
예제 #6
0
 def _remove_ns(self):
     priv_ip_lib.remove_netns(self.namespace)
예제 #7
0
 def _cleanup(self):
     if self.namespace:
         priv_ip_lib.remove_netns(self.namespace)
     else:
         priv_ip_lib.delete_interface(self.device_vxlan, None)
         priv_ip_lib.delete_interface(self.device, None)
예제 #8
0
 def _remove_ns(self):
     priv_ip_lib.remove_netns(self.namespace)
예제 #9
0
 def _remove_ns(self, namespace):
     priv_ip_lib.remove_netns(namespace)
예제 #10
0
 def _cleanup(self):
     if self.namespace:
         priv_ip_lib.remove_netns(self.namespace)
     else:
         priv_ip_lib.delete_interface(self.device_vxlan, None)
         priv_ip_lib.delete_interface(self.device, None)