Example #1
0
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)
Example #2
0
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)
Example #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
Example #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
Example #5
0
 def _remove_ns(self, namespace):
     priv_ip_lib.remove_netns(namespace)
 def _remove_ns(self):
     priv_ip_lib.remove_netns(self.namespace)
 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)
Example #8
0
 def _remove_ns(self):
     priv_ip_lib.remove_netns(self.namespace)
Example #9
0
 def _remove_ns(self, namespace):
     priv_ip_lib.remove_netns(namespace)
Example #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)