summaryrefslogtreecommitdiffstats
path: root/yardstick/common/openstack_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/common/openstack_utils.py')
-rw-r--r--yardstick/common/openstack_utils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py
index 591a1b313..a6b53a607 100644
--- a/yardstick/common/openstack_utils.py
+++ b/yardstick/common/openstack_utils.py
@@ -615,13 +615,13 @@ def create_floating_ip(shade_client, network_name_or_id=None, server=None,
"Exception message: %s", o_exc.orig_message)
-def delete_floating_ip(nova_client, floatingip_id): # pragma: no cover
+def delete_floating_ip(shade_client, floating_ip_id, retry=1):
try:
- nova_client.floating_ips.delete(floatingip_id)
- return True
- except Exception: # pylint: disable=broad-except
- log.error("Error [delete_floating_ip(nova_client, '%s')]",
- floatingip_id)
+ return shade_client.delete_floating_ip(floating_ip_id=floating_ip_id,
+ retry=retry)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [delete_floating_ip(shade_client,'%s')]. "
+ "Exception message: %s", floating_ip_id, o_exc.orig_message)
return False