From a473dce20c36df793aaaa0a43a2d13d42cc4815b Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 22 Dec 2015 11:51:55 +0100 Subject: Wait for floatingips to be released in clean_openstack script Change-Id: I4d4a6866aa93d05729f625f4dffc1138cecffb16 Signed-off-by: jose.lausuch --- testcases/VIM/OpenStack/CI/libraries/clean_openstack.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testcases/VIM/OpenStack') diff --git a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py index bdb1f7ea..806d53c2 100644 --- a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py +++ b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py @@ -144,6 +144,16 @@ def remove_floatingips(nova_client): logger.info(" > ERROR: There has been a problem removing the " "floating IP %s..." % fip_id) + timeout = 50 + while timeout > 0: + floatingips = functest_utils.get_floating_ips(nova_client) + if floatingips is None or len(floatingips) == 0: + break + else: + logger.debug("Waiting for floating ips to be released...") + timeout -= 1 + time.sleep(1) + def remove_networks(neutron_client): logger.info("Removing Neutron objects") -- cgit 1.2.3-korg