diff options
author | 2017-06-26 10:06:30 +0000 | |
---|---|---|
committer | 2017-06-26 10:06:30 +0000 | |
commit | c8d5216c01c42f0e090f9b441985f8ebc3eca0ed (patch) | |
tree | 04368bda549260970c7b07f12ac09e722b15c1ef /functest/utils/openstack_clean.py | |
parent | a0902eb46edae259f4c0bd0c0209678d989e904b (diff) | |
parent | 971a0c33c0ad2625dc28ab4b81f588ac0a4faaa4 (diff) |
Merge "Change floating ips management from nova to neutron"
Diffstat (limited to 'functest/utils/openstack_clean.py')
-rwxr-xr-x | functest/utils/openstack_clean.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/functest/utils/openstack_clean.py b/functest/utils/openstack_clean.py index 0ce08798..229fbf02 100755 --- a/functest/utils/openstack_clean.py +++ b/functest/utils/openstack_clean.py @@ -135,9 +135,9 @@ def remove_volumes(cinder_client, default_volumes): "NOT be deleted.") -def remove_floatingips(nova_client, default_floatingips): +def remove_floatingips(neutron_client, default_floatingips): logger.debug("Removing floating IPs...") - floatingips = os_utils.get_floating_ips(nova_client) + floatingips = os_utils.get_floating_ips(neutron_client) if floatingips is None or len(floatingips) == 0: logger.debug("No floating IPs found.") return @@ -151,7 +151,7 @@ def remove_floatingips(nova_client, default_floatingips): if (fip_id not in default_floatingips and fip_ip not in default_floatingips.values()): logger.debug("Removing floating IP %s ..." % fip_id) - if os_utils.delete_floating_ip(nova_client, fip_id): + if os_utils.delete_floating_ip(neutron_client, fip_id): logger.debug(" > Done!") deleted += 1 else: @@ -163,7 +163,7 @@ def remove_floatingips(nova_client, default_floatingips): timeout = 50 while timeout > 0: - floatingips = os_utils.get_floating_ips(nova_client) + floatingips = os_utils.get_floating_ips(neutron_client) if floatingips is None or len(floatingips) == (init_len - deleted): break else: @@ -415,7 +415,7 @@ def main(): separator() remove_volumes(cinder_client, default_volumes) separator() - remove_floatingips(nova_client, default_floatingips) + remove_floatingips(neutron_client, default_floatingips) separator() remove_networks(neutron_client, default_networks, default_routers) separator() |