add keystone middlewares for ec2 api

This commit is contained in:
Vishvananda Ishaya
2011-08-11 21:03:37 -07:00
parent b2702c3876
commit ddab1d537b
2 changed files with 2 additions and 13 deletions

View File

@@ -274,18 +274,6 @@ class Middleware(Application):
return self.process_response(response)
class InjectContext(Middleware):
"""Add a 'nova.context' to WSGI environ."""
def __init__(self, context, *args, **kwargs):
self.context = context
super(InjectContext, self).__init__(*args, **kwargs)
@webob.dec.wsgify(RequestClass=Request)
def __call__(self, req):
req.environ['nova.context'] = self.context
return self.application
class Debug(Middleware):
"""Helper class for debugging a WSGI application.