summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Waldon <brian.waldon@rackspace.com>2011-12-29 10:57:38 -0500
committerBrian Waldon <brian.waldon@rackspace.com>2011-12-29 11:25:04 -0500
commite135f939a40617ef5b5c9847454c2db066eb72cb (patch)
tree76407d986fa8fe3ad648958f6260ab5a4b7b68c0
parent4ea63c4021b09b74997bf252aa656b7144dc54e4 (diff)
Fixing novaclient_converter NameError
bug 909772 Change-Id: Iac7b45648cd1c85fdc3c8febbd0ef69b63a70c92
-rw-r--r--nova/api/openstack/v2/servers.py8
-rw-r--r--nova/exception.py9
2 files changed, 9 insertions, 8 deletions
diff --git a/nova/api/openstack/v2/servers.py b/nova/api/openstack/v2/servers.py
index 5c62a7f82..d98d532dc 100644
--- a/nova/api/openstack/v2/servers.py
+++ b/nova/api/openstack/v2/servers.py
@@ -41,14 +41,6 @@ LOG = logging.getLogger('nova.api.openstack.v2.servers')
FLAGS = flags.FLAGS
-class ConvertedException(exc.WSGIHTTPException):
- def __init__(self, code, title, explanation):
- self.code = code
- self.title = title
- self.explanation = explanation
- super(ConvertedException, self).__init__()
-
-
class Controller(wsgi.Controller):
""" The Server API base controller class for the OpenStack API """
diff --git a/nova/exception.py b/nova/exception.py
index 95e34afe2..186a6ac58 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -28,12 +28,21 @@ from functools import wraps
import sys
from novaclient import exceptions as novaclient_exceptions
+import webob.exc
from nova import log as logging
LOG = logging.getLogger('nova.exception')
+class ConvertedException(webob.exc.WSGIHTTPException):
+ def __init__(self, code=0, title="", explanation=""):
+ self.code = code
+ self.title = title
+ self.explanation = explanation
+ super(ConvertedException, self).__init__()
+
+
def novaclient_converter(f):
"""Convert novaclient ClientException HTTP codes to webob exceptions.
Has to be the outer-most decorator.