[openstack-dev] [oslo][keystone] Trying to get openstack.common.wsgi in keystoneclient
Adam Young
ayoung at redhat.com
Fri Apr 26 02:41:05 UTC 2013
On 04/24/2013 06:25 PM, Mark McLoughlin wrote:
> Hi,
>
> On Wed, 2013-04-24 at 17:07 +0200, Chmouel Boudjnah wrote:
>> Hello,
>>
>> I am trying to move the s3_token and ec2_token middleware to
>> python-keystoneclient I thought it would be a good idea to make them
>> using openstack.common.wsgi instead of {swift,keystone,nova}.wsgi
> How much of openstack.common.wsgi do these middlewares actually use?
> Would it be reasonable to factor out the middleware-supporting code into
> a standalone module?
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Doesn't look like they use all that much. ec2 middleware uses
nova/wsgi.py's Middleware object, which extends Application. This
pattern seems pretty common through the other middlewares. Application
is bascially an Abstract base class, and pulls in no dependencies. The
Middleware class depends on webob,
@webob.dec.wsgify(RequestClass=Request)
And that is pretty much it.
wsgi.py in both Nova and Keystone directly depend on Eventlet, and I've
been trying to work around that for HTTPD support. The Application and
Middleware classes do not seem to need Eventlet specific code, and
pulling them out would be a sound refactoring. It looks like the
Keystone one is a cut/paste version of the Nova on anyway, and that also
makes it a candidate for extraction.
More information about the OpenStack-dev
mailing list