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
This commit is contained in:
James Page 2017-08-01 09:06:07 +01:00
parent b5e1153385
commit 5967b18b50
1 changed files with 1 additions and 1 deletions

View File

@ -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'