[openstack-dev] Writing Methods for Nova API

Trinath Somanchi trinath.somanchi at gmail.com
Thu Sep 13 09:54:31 UTC 2012


Hi-

I'm trying to understand the NOVA api request process flow.

Using my custom script, testing.py, I have created a server with some
metadata. It was successful.  But I have modified to script this way.

I have written a definition,
metadetailserver(self,detailed=True,search_opts=sMetadata) in a custom file
testing.py which uses the novaclient apis.

the sMetadata is a dict with the following values: sMetadata =
{"key":"Created By","value":"TestApp.py"}

Also, in the wsgi.py, I have handled this method for framing the request as
"server/metadetail/" with the metadata values as options using URLencode.

But then I understood that in nova/api/compute/__init__.py have routers and
resource handlers which map the request to the respective controller and
methods.

I want to know on

  [1] How to map the request to the appropriate controller and method ?

With respect to my code study, I came to know that there are view builders
which frame the response in XML or Json formats.

  [2] How to hook a self/newly defined view builder with the new method.


In the code flow study, I was confused or lost at certain points of request
flow.

Can any one kindly help me understand the same.

Thanks in advance.



-- 
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120913/2b6cca20/attachment.html>


More information about the OpenStack-dev mailing list