Hi Madhu,

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.

- Peter

From: Madhu Mohan <mmo...@mvista.com<mailto:mmo...@mvista.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Date: Thursday, August 14, 2014 at 2:54 AM
To: openstack-dev 
<openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>
Subject: [openstack-dev] [Congress] Help in understanding API Flow

Hi,

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.

Thanks,
Madhu Mohan
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to