From bee5dc6f2d0d797bba610f3675b2bb698ae40429 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty <asarfaty@vmware.com> Date: Tue, 6 Feb 2018 01:21:46 +0200 Subject: [PATCH] TVD: fix get_<>s but plugin with filters When getting networks/ports/etc with filters, we should filter by the context plugin even if filters are added to the request Change-Id: I25c8df14cb5958842518557a302264995bcbb7d7 --- vmware_nsx/plugins/nsx/plugin.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vmware_nsx/plugins/nsx/plugin.py b/vmware_nsx/plugins/nsx/plugin.py index c417e2502e..18ed45f457 100644 --- a/vmware_nsx/plugins/nsx/plugin.py +++ b/vmware_nsx/plugins/nsx/plugin.py @@ -319,11 +319,8 @@ class NsxTVDPlugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, project_id = filters.get('tenant_id') elif filters.get('project_id'): project_id = filters.get('project_id') - else: - # A specific filter request is made. So here we - # will not filter according to the plugin. - return - # If there are multiple tenants/prijects being requested then + + # If there are multiple tenants/projects being requested then # we will not filter according to the plugin if isinstance(project_id, list): return