Fix invalid query selector with list_ports

Fixed an exception thrown by neutron_client's list_ports when the
deletion of the VIP security group fails.

Story 2005355
Task 30309

Change-Id: I7d972dcc6b43406523063f2082b42e2d9a2b50c9
This commit is contained in:
Gregory Thiemonge 2019-04-02 14:32:09 +02:00
parent 147a340f40
commit 5fb79c9495
2 changed files with 5 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class BaseNeutronDriver(base.AbstractNetworkDriver):
raise base.NetworkException(str(e))
def _get_ports_by_security_group(self, sec_grp_id):
all_ports = self.neutron_client.list_ports(project=self.project_id)
all_ports = self.neutron_client.list_ports(project_id=self.project_id)
filtered_ports = []
for port in all_ports.get('ports', []):
if sec_grp_id in port.get('security_groups', []):

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fixed an error triggered when the deletion of the VIP security group fails.