From 406c8cdf027b13636ab3c8fa609aabe929057d6f Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Tue, 4 Jan 2011 18:46:12 -0500 Subject: Remove flags and unused API class from openstack api, since such things are specified in paste config now. --- nova/api/openstack/__init__.py | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py index a1430caed..c5de03a09 100644 --- a/nova/api/openstack/__init__.py +++ b/nova/api/openstack/__init__.py @@ -43,40 +43,11 @@ from nova.api.openstack import sharedipgroups FLAGS = flags.FLAGS -flags.DEFINE_string('os_api_auth', - 'nova.api.openstack.auth.AuthMiddleware', - 'The auth mechanism to use for the OpenStack API implemenation') - -flags.DEFINE_string('os_api_ratelimiting', - 'nova.api.openstack.ratelimiting.RateLimitingMiddleware', - 'Default ratelimiting implementation for the Openstack API') - flags.DEFINE_bool('allow_admin_api', False, 'When True, this API service will accept admin operations.') -class API(wsgi.Middleware): - """WSGI entry point for all OpenStack API requests.""" - - def __init__(self): - auth_middleware = utils.import_class(FLAGS.os_api_auth) - ratelimiting_middleware = \ - utils.import_class(FLAGS.os_api_ratelimiting) - app = auth_middleware(ratelimiting_middleware(APIRouter())) - super(API, self).__init__(app) - - @webob.dec.wsgify - def __call__(self, req): - try: - return req.get_response(self.application) - except Exception as ex: - logging.warn(_("Caught error: %s") % str(ex)) - logging.error(traceback.format_exc()) - exc = webob.exc.HTTPInternalServerError(explanation=str(ex)) - return faults.Fault(exc) - - class APIRouter(wsgi.Router): """ Routes requests on the OpenStack API to the appropriate controller -- cgit