diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2017-06-23 11:32:56 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2017-06-26 09:47:12 +0200 |
commit | 971a0c33c0ad2625dc28ab4b81f588ac0a4faaa4 (patch) | |
tree | aa0df26eed9482eaf76dfd24010b8d4935447f33 /functest/utils/openstack_clean.py | |
parent | b04150dda0678772a6a42da8d7878deb4ddcd551 (diff) |
Change floating ips management from nova to neutron
Nova does not longer support floating ip creation/deletion.
This patch moves that logic to neutron client.
Change-Id: I2c4146149fe5be534d9c50d78d831b5af1957ad7
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
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() |