[openstack-dev] [api] [glance] conclusion needed on functional API

Flavio Percoco flavio at redhat.com
Sun Feb 15 09:08:26 UTC 2015


On 15/02/15 06:31 +0000, Brian Rosmaita wrote:
>This is a follow-up to the discussion at the 12 February API-WG meeting
>[1] concerning "functional" API in Glance [2].  We made some progress, but
>need to close this off so the spec can be implemented in Kilo.
>
>I believe this is where we left off:
>1. The general consensus was that POST is the correct verb.
>
>2. Did not agree on what to POST.  Three options are in play:
>(A) POST /images/{image_id}?action=deactivate
>    POST /images/{image_id}?action=reactivate
>
>(B) POST /images/{image_id}/actions
>    with payload describing the action, e.g.,
>    { "action": "deactivate" }
>    { "action": "reactivate" }
>
>(C) POST /images/{image_id}/actions/deactivate
>    POST /images/{image_id}/actions/reactivate
>
>The spec proposes to use (C), following the discussion at the Atlanta
>summit.
>
>As a quick summary of why (C) was proposed (since all the above were
>actually discussed at the summit), I'd like to quote from Hemanth's ML
>posting right after the summit [4]:
>
>1. Discoverability of operations.  It'll be easier to expose permitted
>actions through schemas [or] a json home document living at
>/images/{image_id}/actions/.
>2. More conducive for rate-limiting. It'll be easier to rate-limit actions
>in different ways if the action type is available in the URL.
>3. Makes more sense for functional actions that don't require a request
>body (e.g., image deactivation).

I like option C as well. It also leaves some room for sending
parameters in the body when the action requires it.

Thanks for the summary, Brian.
Flavio

>
>If you have a strong opinion, please reply to this message, and I will
>report on the conclusion at the API-WG meeting at 00:00 UTC on 2015-02-19
>[5].  This will be the third API-WG meeting at which this topic was
>discussed; I would really like to see us reach a conclusion at this
>meeting.
>
>Thank you!
>
>[1]
>http://eavesdrop.openstack.org/meetings/api_wg/2015/api_wg.2015-02-12-16.00
>.log.html
>[2] https://review.openstack.org/#/c/135122
>[3]
>https://etherpad.openstack.org/p/glance-adding-functional-operations-to-api
>[4] http://lists.openstack.org/pipermail/openstack-dev/2014-May/036416.html
>[5] https://wiki.openstack.org/wiki/Meetings/API-WG
>
>
>__________________________________________________________________________
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-- 
@flaper87
Flavio Percoco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150215/183cccf3/attachment.pgp>


More information about the OpenStack-dev mailing list