summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-11-22 17:59:49 -0500
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-11-22 17:59:49 -0500
commita19d0e294efac1fb7e8e3e45a286f6032172da23 (patch)
tree01e6dc90c311ed2ed45840edfae4575602db3f71
parentff9b3b49090773070439d37df3149727fc7d3988 (diff)
Rename cloudServersFault (rackspace branding) to computeFault. Fixes bug lp680285.
-rw-r--r--nova/api/openstack/faults.py2
-rw-r--r--nova/tests/api/openstack/test_api.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py
index e69e51439..224a7ef0b 100644
--- a/nova/api/openstack/faults.py
+++ b/nova/api/openstack/faults.py
@@ -47,7 +47,7 @@ class Fault(webob.exc.HTTPException):
"""Generate a WSGI response based on the exception passed to ctor."""
# Replace the body with fault details.
code = self.wrapped_exc.status_int
- fault_name = self._fault_names.get(code, "cloudServersFault")
+ fault_name = self._fault_names.get(code, "computeFault")
fault_data = {
fault_name: {
'code': code,
diff --git a/nova/tests/api/openstack/test_api.py b/nova/tests/api/openstack/test_api.py
index dd83991b9..d8b202e21 100644
--- a/nova/tests/api/openstack/test_api.py
+++ b/nova/tests/api/openstack/test_api.py
@@ -50,12 +50,12 @@ class APITest(unittest.TestCase):
api.application = succeed
resp = Request.blank('/').get_response(api)
- self.assertFalse('cloudServersFault' in resp.body, resp.body)
+ self.assertFalse('computeFault' in resp.body, resp.body)
self.assertEqual(resp.status_int, 200, resp.body)
api.application = raise_webob_exc
resp = Request.blank('/').get_response(api)
- self.assertFalse('cloudServersFault' in resp.body, resp.body)
+ self.assertFalse('computeFault' in resp.body, resp.body)
self.assertEqual(resp.status_int, 404, resp.body)
api.application = raise_api_fault
@@ -65,10 +65,10 @@ class APITest(unittest.TestCase):
api.application = fail
resp = Request.blank('/').get_response(api)
- self.assertTrue('{"cloudServersFault' in resp.body, resp.body)
+ self.assertTrue('{"computeFault' in resp.body, resp.body)
self.assertEqual(resp.status_int, 500, resp.body)
api.application = fail
resp = Request.blank('/.xml').get_response(api)
- self.assertTrue('<cloudServersFault' in resp.body, resp.body)
+ self.assertTrue('<computeFault' in resp.body, resp.body)
self.assertEqual(resp.status_int, 500, resp.body)