summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-05 02:59:45 +0000
committerGerrit Code Review <review@openstack.org>2013-03-05 02:59:45 +0000
commit87b8e04abbdee83e251f8e38d31cdd559ee791e0 (patch)
tree4f78cb35164bfb8c11b875c4b79482ac8b5d665f /nova/api
parent1ba9da7ef9f3eed45137295006e69e1cdb3c9c7f (diff)
parent5b38c5c6fe57f7b0d3e36a5d0206488fa01106c0 (diff)
downloadnova-87b8e04abbdee83e251f8e38d31cdd559ee791e0.tar.gz
nova-87b8e04abbdee83e251f8e38d31cdd559ee791e0.tar.xz
nova-87b8e04abbdee83e251f8e38d31cdd559ee791e0.zip
Merge "Return proper error messages while disassociating floating IP"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/floating_ips.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py
index 2f3c56199..bf1246ccb 100644
--- a/nova/api/openstack/compute/contrib/floating_ips.py
+++ b/nova/api/openstack/compute/contrib/floating_ips.py
@@ -294,7 +294,9 @@ class FloatingIPActionController(wsgi.Controller):
disassociate_floating_ip(self, context, instance, address)
return webob.Response(status_int=202)
else:
- return webob.Response(status_int=404)
+ msg = _("Floating ip %(address)s is not associated with instance "
+ "%(id)s.") % locals()
+ raise webob.exc.HTTPUnprocessableEntity(explanation=msg)
class Floating_ips(extensions.ExtensionDescriptor):