From 5967b18b5042b08991178ab9ddae0574c1968c03 Mon Sep 17 00:00:00 2001 From: James Page Date: Tue, 1 Aug 2017 09:06:07 +0100 Subject: [PATCH] deepcopy SRIOV_RESOURCE_MAP Ensure that a full copy of the SR-IOV resource map is made when building the full resource_map for the charm; this avoids any direct manipulation of the constant SRIOV_RESOURCE_MAP and some associated unit test failures. Change-Id: Ia1d1da9e625fa85dc0afc8931b11bc2b30b41c09 --- hooks/neutron_ovs_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py index 14eff4ad..90aca73a 100644 --- a/hooks/neutron_ovs_utils.py +++ b/hooks/neutron_ovs_utils.py @@ -331,7 +331,7 @@ def resource_map(): if enable_sriov_agent(): sriov_agent_name = 'neutron-sriov-agent' - sriov_resource_map = SRIOV_RESOURCE_MAP + sriov_resource_map = deepcopy(SRIOV_RESOURCE_MAP) if CompareOpenStackReleases(_os_release) < 'mitaka': sriov_agent_name = 'neutron-plugin-sriov-agent'