From ede9f62894bd29194ba4eca5de4e226cd447a9da Mon Sep 17 00:00:00 2001 From: pmikus Date: Tue, 20 Oct 2020 14:37:33 +0000 Subject: FIX: Namespace deletion + Not sure who was doing code. + Set interface up should have namespace version Signed-off-by: pmikus Change-Id: I1103cddb9dd11e25a8ab0ce3f5126b2db9444749 --- resources/libraries/python/Namespaces.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'resources/libraries/python/Namespaces.py') diff --git a/resources/libraries/python/Namespaces.py b/resources/libraries/python/Namespaces.py index 2bdcbcb324..4bea8b5575 100644 --- a/resources/libraries/python/Namespaces.py +++ b/resources/libraries/python/Namespaces.py @@ -13,6 +13,8 @@ """Linux namespace utilities library.""" +from copy import deepcopy + from resources.libraries.python.ssh import exec_cmd_no_error, exec_cmd @@ -145,5 +147,6 @@ class Namespaces: Namespaces.delete_namespace(node, namespace) return - for namespace_name in Namespaces.__namespaces: + namespace_copy = deepcopy(Namespaces.__namespaces) + for namespace_name in namespace_copy: Namespaces.delete_namespace(node, namespace_name) -- cgit 1.2.3-korg