diff options
| author | Todd Willey <todd@ansolabs.com> | 2011-01-04 18:46:12 -0500 |
|---|---|---|
| committer | Todd Willey <todd@ansolabs.com> | 2011-01-04 18:46:12 -0500 |
| commit | 406c8cdf027b13636ab3c8fa609aabe929057d6f (patch) | |
| tree | 07690f321f36ba92a0894b879580d2ec77ea6819 /nova/api | |
| parent | 6dc2e665b5b6f690882e6029984a11dc7063b437 (diff) | |
| download | nova-406c8cdf027b13636ab3c8fa609aabe929057d6f.tar.gz nova-406c8cdf027b13636ab3c8fa609aabe929057d6f.tar.xz nova-406c8cdf027b13636ab3c8fa609aabe929057d6f.zip | |
Remove flags and unused API class from openstack api, since such things are specified in paste config now.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/__init__.py | 29 |
1 files changed, 0 insertions, 29 deletions
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 |
