Commit 4e142703 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

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 dd262030
......@@ -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