Most of the Cinder Public API Controllers inherit from wsgi.Controller,
but still some Cinder Public APIs controllers directly inherit from
object. So it's necessary to unify all the Cinder Public API Controllers
inherit from wsgi.Controller.
1. For code cleanup.
2. When we try to do body valid check in api's put/post method later, we
can use the helper function is_valid_body instead of using try...catch
block.
Change-Id: I88812224e0b182939cfccce63982cb8f95792891
Closes-Bug: #
1257198
return wrapped
-class HostController(object):
+class HostController(wsgi.Controller):
"""The Hosts API controller for the OpenStack API."""
def __init__(self):
self.api = volume_api.HostAPI()
return xmlutil.MasterTemplate(root, 1)
-class ServiceController(object):
+class ServiceController(wsgi.Controller):
@wsgi.serializers(xml=ServicesIndexTemplate)
def index(self, req):
"""Return a list of all running services.
return xmlutil.MasterTemplate(root, 1, nsmap=limits_nsmap)
-class LimitsController(object):
+class LimitsController(wsgi.Controller):
"""Controller for accessing limits in the OpenStack API."""
@wsgi.serializers(xml=LimitsTemplate)
from webob import exc
-class Controller(object):
+class Controller(wsgi.Controller):
"""The volume metadata API controller for the OpenStack API."""
def __init__(self):
from webob import exc
-class Controller(object):
+class Controller(wsgi.Controller):
"""The volume metadata API controller for the OpenStack API."""
def __init__(self):
return xmlutil.MasterTemplate(root, 1, nsmap=limits_nsmap)
-class LimitsController(object):
+class LimitsController(wsgi.Controller):
"""Controller for accessing limits in the OpenStack API."""
@wsgi.serializers(xml=LimitsTemplate)
from webob import exc
-class Controller(object):
+class Controller(wsgi.Controller):
"""The volume metadata API controller for the OpenStack API."""
def __init__(self):
from cinder import volume
-class Controller(object):
+class Controller(wsgi.Controller):
"""The volume metadata API controller for the OpenStack API."""
def __init__(self):