aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/openstack_snapshot.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-06-23 11:32:56 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2017-06-26 09:47:12 +0200
commit971a0c33c0ad2625dc28ab4b81f588ac0a4faaa4 (patch)
treeaa0df26eed9482eaf76dfd24010b8d4935447f33 /functest/utils/openstack_snapshot.py
parentb04150dda0678772a6a42da8d7878deb4ddcd551 (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_snapshot.py')
-rwxr-xr-xfunctest/utils/openstack_snapshot.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/functest/utils/openstack_snapshot.py b/functest/utils/openstack_snapshot.py
index 233c316a..a03c5032 100755
--- a/functest/utils/openstack_snapshot.py
+++ b/functest/utils/openstack_snapshot.py
@@ -98,13 +98,14 @@ def get_security_groups(neutron_client):
return {'secgroups': dic_secgroups}
-def get_floatinips(nova_client):
+def get_floatingips(neutron_client):
logger.debug("Getting Floating IPs...")
dic_floatingips = {}
- floatingips = os_utils.get_floating_ips(nova_client)
+ floatingips = os_utils.get_floating_ips(neutron_client)
if not (floatingips is None or len(floatingips) == 0):
for floatingip in floatingips:
- dic_floatingips.update({floatingip.id: floatingip.ip})
+ dic_floatingips.update({floatingip['id']:
+ floatingip['floating_ip_address']})
return {'floatingips': dic_floatingips}
@@ -149,7 +150,7 @@ def main():
snapshot.update(get_networks(neutron_client))
snapshot.update(get_routers(neutron_client))
snapshot.update(get_security_groups(neutron_client))
- snapshot.update(get_floatinips(nova_client))
+ snapshot.update(get_floatingips(neutron_client))
snapshot.update(get_users(keystone_client))
snapshot.update(get_tenants(keystone_client))