[openstack-dev] [api] APIs for exposing resource capabilities

Everett Toews everett.toews at RACKSPACE.COM
Wed Aug 3 15:46:24 UTC 2016


On Aug 3, 2016, at 12:59 AM, Ramakrishna, Deepti <deepti.ramakrishna at intel.com<mailto:deepti.ramakrishna at intel.com>> wrote:

Hi,

I would like to bring your attention to my spec [1] (already approved) on capability APIs and would like to get feedback from API WG.

To summarize, I propose defining a capability API for every resource in a REST API where it makes sense and is needed. In the context of Cinder, we would have a capability API at the root resource level (GET /v3.x/{tenant_id}/capabilities) that would return, e.g., [“volume-backup", “other-capability”]. Similarly, we could have a capability API on the volume types resource (GET /v3.x/{tenant_id}/types/{volume_type_id}/capabilities) that would return all the features supported by a volume type and so on.

I believe that this API pattern solves the problem of exposing capabilities and could be used for enabling/disabling UI widgets on Horizon and other clients. This pattern cleanly translates to all OpenStack projects which all face the general problem.

Can you please look at the spec (and the implementation for Cinder [2]) and let me know if you have any feedback? I would be most interested in knowing your thoughts about cross-project suitability of this solution.

Thanks,
Deepti

[1] https://review.openstack.org/#/c/306930/
[2] https://review.openstack.org/#/c/350310/

I added this topic to the API WG meeting tomorrow.

https://wiki.openstack.org/wiki/Meetings/API-WG

Everett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160803/355cc76a/attachment.html>


More information about the OpenStack-dev mailing list