From: Cédric Ollivier Date: Thu, 24 Jan 2019 20:30:45 +0000 (+0100) Subject: Fix an invalid filter attribute when listing floating ips X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=7cfa523841882975ab2d5dd1e538183040d282c5;p=snaps.git Fix an invalid filter attribute when listing floating ips 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 --- 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: