diff options
| author | Josh Kearney <josh@jk0.org> | 2011-04-07 19:30:52 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-07 19:30:52 +0000 |
| commit | 7a73a06bca40dbd0f005b466f3824170cdc64f4d (patch) | |
| tree | 8e56ae1c3dc7eaad43c5549b76a6f3ae2f414ca1 /nova | |
| parent | c9b58d39044166bf5a03991e33a5302e1cd5cce9 (diff) | |
| parent | 404feb59a829e24e026f793a362e54aad1aaa03f (diff) | |
Renamed computeFault back to cloudServersFault in an effort to maintain consistency with the 1.0 API spec. We can look into distinguishing the two in the next release. Held off for now to avoid potential regression.
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/api/openstack/faults.py | 2 | ||||
| -rw-r--r-- | nova/tests/api/openstack/test_api.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py index bc97639a0..87118ce19 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, "computeFault") + fault_name = self._fault_names.get(code, "cloudServersFault") 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 5112c486f..c63431a45 100644 --- a/nova/tests/api/openstack/test_api.py +++ b/nova/tests/api/openstack/test_api.py @@ -53,13 +53,13 @@ class APITest(test.TestCase): #api.application = succeed api = self._wsgi_app(succeed) resp = Request.blank('/').get_response(api) - self.assertFalse('computeFault' in resp.body, resp.body) + self.assertFalse('cloudServersFault' in resp.body, resp.body) self.assertEqual(resp.status_int, 200, resp.body) #api.application = raise_webob_exc api = self._wsgi_app(raise_webob_exc) resp = Request.blank('/').get_response(api) - self.assertFalse('computeFault' in resp.body, resp.body) + self.assertFalse('cloudServersFault' in resp.body, resp.body) self.assertEqual(resp.status_int, 404, resp.body) #api.application = raise_api_fault @@ -71,11 +71,11 @@ class APITest(test.TestCase): #api.application = fail api = self._wsgi_app(fail) resp = Request.blank('/').get_response(api) - self.assertTrue('{"computeFault' in resp.body, resp.body) + self.assertTrue('{"cloudServersFault' in resp.body, resp.body) self.assertEqual(resp.status_int, 500, resp.body) #api.application = fail api = self._wsgi_app(fail) resp = Request.blank('/.xml').get_response(api) - self.assertTrue('<computeFault' in resp.body, resp.body) + self.assertTrue('<cloudServersFault' in resp.body, resp.body) self.assertEqual(resp.status_int, 500, resp.body) |
