-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
"""Linux namespace utilities library."""
+from copy import deepcopy
+
from resources.libraries.python.ssh import exec_cmd_no_error, exec_cmd
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)