[openstack-dev] [Congress] Help in understanding API Flow
pballand at vmware.com
Thu Aug 14 23:17:04 UTC 2014
If you are trying to expose data from a new service, you need to add a new data-source driver (examples from nova and neutron are in the tree.) Once a data-source driver is registered, data from the data source will be exposed through the API automatically, and you will also be able to write policy based on the data. (Note that using the current code in master your data source will not be activated until it is referenced by a policy - a commit is in flight to change that, however.)
If, instead, you are trying to expose non datasource data in the API, it would involve implementing the DataModel interface (see api/webservice.py) and binding it to a URI and handler in congress_server.py. If this is what you want to do, please provide more details on what you are exposing and I can walk you through it.
From: Madhu Mohan <mmohan at mvista.com<mailto:mmohan at mvista.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Thursday, August 14, 2014 at 2:54 AM
To: openstack-dev <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: [openstack-dev] [Congress] Help in understanding API Flow
Can some one help me understand how an API is exposed to the clients from Congress server ?
I see that a cage service ('api-policy') is created in congress_server.py.
I believe this is implemented in policy_model. I tried to send a json_request from my client on the server.
I tried sending "list_members", "get_items", "PUT" and "POST" as methods and all these give me "NotImplemented" error response.
Any help in this direction ?
I also want to add new APIs and hence understanding the API flow is crucial.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev