From 7cfa523841882975ab2d5dd1e538183040d282c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Thu, 24 Jan 2019 21:30:45 +0100 Subject: [PATCH] Fix an invalid filter attribute when listing floating ips MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The request doesn't conform with API [1] and raises exceptions vs Neutron Hunter: neutronclient.common.exceptions.BadRequest: [u'ip'] is invalid attribute for filtering Neutron server returns request_ids: ['req-857b6294-eea5-46cf-8c95-0e57279ed5e6'] [1] https://developer.openstack.org/api-ref/network/v2/index.html?expanded=list-floating-ips-detail Change-Id: I52bac8806152695834f8ece4f0213c3c63134c79 Signed-off-by: Cédric Ollivier --- snaps/openstack/utils/neutron_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snaps/openstack/utils/neutron_utils.py b/snaps/openstack/utils/neutron_utils.py index c199b99..f1a5ac2 100644 --- a/snaps/openstack/utils/neutron_utils.py +++ b/snaps/openstack/utils/neutron_utils.py @@ -890,7 +890,7 @@ def __get_os_floating_ip(neutron, floating_ip): """ logger.debug('Attempting to retrieve existing floating ip with IP - %s', floating_ip.ip) - fips = neutron.list_floatingips(ip=floating_ip.id) + fips = neutron.list_floatingips(floating_ip_address=floating_ip.ip) for fip in fips['floatingips']: if fip['id'] == floating_ip.id: -- 2.16.6