← Back to team overview

openstack team mailing list archive

Re: Openstack Nova/Quantum :; api-paste.ini file

 

On Thu, 2012-12-06 at 23:58 +0530, Trinath Somanchi wrote:
> Suppose, we have a resquest to Nova..
> 
> The following steps are performed...
> 
> 1. The request is captured by webob and is authenticated by keystone
> and is decorated to wsgi app

Not quite correct; webob decorates (some of) the functions called, so
all functions in the WSGI stack end up having the WSGI calling
convention ("func(env, start_response)").  The bulk of the middleware
uses the webob wsgify decorator, but there are some exceptions
(auth_token being one of them).  Other than that point, this is correct.

> 2. Nova-api maps the url params to extensions

nova-api maps the URIs to controller classes and methods on those
classes (it uses the routes package to accomplish this).  Some of those
classes are extensions, rather than core; some of those interfaces are
further extended by the extensions (the extensions infrastructure can
accomplish both).  IOW, you are essentially correct…

> 3. Nova-api extensions return the data dict.. Which webob returns as
> response to the request in json/xml format...

Well, it's nova that serializes the data dict to the appropriate format;
webob just handles the mechanics of sending the serialized data back,
along with appropriate HTTP headers.  The serialization framework is a
little complicated, so let's omit it for now…

> 4. Paste-api helps the keystone and other modules for update of the
> request...

PasteDeploy builds the processing pipeline based on the values in
api-paste.ini and friends, putting the middleware into the correct
order, with the final application at the end of the chain.  (Note that
middleware is *not* extension, but rather additional processing done on
the request as a whole.)

> Kindly please help me by validating my understanding ...

I think you've fairly well understood most of it, aside from some
subtleties that I've tried to correct above.
-- 
Kevin L. Mitchell <kevin.mitchell@xxxxxxxxxxxxx>



Follow ups

References