NSX-TVD: Copy filters dict before calling plugin

NSX-T plugin modified the filters dict, which breaks the calls to
following plugins.

Change-Id: I404ad7da4b3cdea000e5ae7464960799cae0c113
This commit is contained in:
Kobi Samoray 2019-10-27 15:56:58 +02:00
parent 5f6c55024f
commit 396bae4d9c
1 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import copy
from neutron_lib.api.definitions import network as net_def
from neutron_lib.api.definitions import port as port_def
from neutron_lib.api.definitions import subnet as subnet_def
@ -538,7 +540,8 @@ class NsxTVDPlugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
if ((fields and as_providers.ADV_SERVICE_PROVIDERS in fields) or
(filters and filters.get(as_providers.ADV_SERVICE_PROVIDERS))):
for plugin in self.as_providers.values():
subnets = plugin.get_subnets(context, filters=filters,
f = copy.copy(filters)
subnets = plugin.get_subnets(context, filters=f,
fields=fields, sorts=sorts,
limit=limit, marker=marker,
page_reverse=page_reverse)