From 5fb79c94956a4f1386ae3d5e61854750bc738f44 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Tue, 2 Apr 2019 14:32:09 +0200 Subject: [PATCH] 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 --- octavia/network/drivers/neutron/base.py | 2 +- .../fix-invalid-attribute-for-filtering-d2ddb95a1acbded2.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-invalid-attribute-for-filtering-d2ddb95a1acbded2.yaml diff --git a/octavia/network/drivers/neutron/base.py b/octavia/network/drivers/neutron/base.py index f9ec4f2b6a..70ab085192 100644 --- a/octavia/network/drivers/neutron/base.py +++ b/octavia/network/drivers/neutron/base.py @@ -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', []): diff --git a/releasenotes/notes/fix-invalid-attribute-for-filtering-d2ddb95a1acbded2.yaml b/releasenotes/notes/fix-invalid-attribute-for-filtering-d2ddb95a1acbded2.yaml new file mode 100644 index 0000000000..8068d4fe1b --- /dev/null +++ b/releasenotes/notes/fix-invalid-attribute-for-filtering-d2ddb95a1acbded2.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fixed an error triggered when the deletion of the VIP security group fails.