summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-08-12 10:59:10 -0400
committerDan Prince <dan.prince@rackspace.com>2011-08-12 10:59:10 -0400
commitf95e0118d91a8f77345e4d78980e2523cb4dba56 (patch)
tree413e56ef7cd8687dfe5874d61811051e76e00cf2
parentc1deb4b35107eff13d0d614fef28fb9af04c7b88 (diff)
Fixes to the OSAPI floating API extension DELETE.
Updated to use correct args for self.disassociate (don't sweep exceptions which should cause test cases to fail under the rug). Additionally updated to pass network_api.release_floating_ip the address instead of a dict.
-rw-r--r--nova/api/openstack/contrib/floating_ips.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/nova/api/openstack/contrib/floating_ips.py b/nova/api/openstack/contrib/floating_ips.py
index 2aba1068a..c07bfdf09 100644
--- a/nova/api/openstack/contrib/floating_ips.py
+++ b/nova/api/openstack/contrib/floating_ips.py
@@ -104,12 +104,9 @@ class FloatingIPController(object):
ip = self.network_api.get_floating_ip(context, id)
if 'fixed_ip' in ip:
- try:
- self.disassociate(req, id, '')
- except Exception as e:
- LOG.exception(_("Error disassociating fixed_ip %s"), e)
+ self.disassociate(req, id)
- self.network_api.release_floating_ip(context, address=ip)
+ self.network_api.release_floating_ip(context, address=ip['address'])
return {'released': {
"id": ip['id'],