Commit f73bc78c authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis Committed by Giorgos Korfiatis

burnin: Fix a bug in '_delete_floating_ips'

Renew the list of floating IP objects as it may have been changed
(i.e. a port may have been deleted).
parent 1b6cdba8
......@@ -567,7 +567,13 @@ class CycladesTests(BurninTests):
def _delete_floating_ips(self, fips):
"""Delete floating ips"""
for fip in fips:
# Renew the list of floating IP objects
# (It may have been changed, i.e. a port may have been deleted).
fip_ids = [f['id'] for f in fips]
new_fips = [f for f in self.clients.network.list_floatingips()
if f['id'] in fip_ids]
for fip in new_fips:
port_id = fip['port_id']
if port_id:
self.info("Destroying port with id %s", port_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment