summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)