summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-01-24 21:30:45 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2019-01-24 21:33:16 +0100
commit7cfa523841882975ab2d5dd1e538183040d282c5 (patch)
tree963c31fe8a77cf347e482fcb790c0b539b020483
parent7c8b405bc02d5b489beb359f86ba57c831648897 (diff)
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 <cedric.ollivier@orange.com>
-rw-r--r--snaps/openstack/utils/neutron_utils.py2
1 files changed, 1 insertions, 1 deletions
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: