Re: Gluster REST - Management REST APIs for Glusterd 1.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 28, 2015 at 1:27 PM, Aravinda <avishwan@xxxxxxxxxx> wrote:
>
> regards
> Aravinda
>
> On 12/28/2015 01:01 PM, Vijay Bellur wrote:
>>
>> On 12/21/2015 05:51 AM, Aravinda wrote:
>>>
>>> Hi,
>>>
>>> In the past I submitted a feature([1] and [2]) to provide REST interface
>>> to Gluster
>>> CLI commands. I abandoned the patch because Glusterd 2.0 had plan to
>>> include REST API support natively. Now I started again since other
>>> projects like "skyrings"[3] is looking for REST API support for
>>> Gluster.
>>>
>>> Created a gist[4] to discuss the REST API formats, Please review and let
>>> me know your thoughts. Document is still in WIP, will update the
>>> document by next week.
>>>
>>
>> Are these APIs in sync with the ones in review for glusterd 2.0? Even with
>> api versioning, I would like us to have the APIs similar to 2.0 as much as
>> possible.
>
>
> I am trying to keep the APIs in sync with glusterd 2.0 for easy migration.
> But have some confusions while choosing the HTTP method for some URLs.
> For example: Volume Creation.
>
> Glusterd 2.0 uses volume name as part of body instead of part of URL since
> volume id is unique identifier and which can be used to perform other volume
> operations like start/stop.
> But in Glusterd 1.0 operations based on ID is not possible using CLIs so two
> calls per request.
>
> POST /volumes/:id/start
>
> In Glusterd 1.0,
>     Get Volname from Gluster Volume info
>     Use that Volname to construct Gluster CLI(gluster volume start :name)
>
> In Glusterd 2.0,
>     May be directly possible to perform action using id.
>

For GD2, in these APIs we will support both IDs and names as
identifiers. We will have easy support for translation between the two
identifiers internally. For the GD1 Rest server, I think we should be
okay just supporting names. Clients using names will not break when
they switch to GD2.

> To avoid this extra processing, I used Volume name as part of URL since
> Volume name is unique identifier per Cluster and these REST APIs are for
> single cluster management.
>
> In Glusterd 1.0
>     PUT /volumes/:name
>
> In Glusterd 2.0
>     POST /volumes
>
> Once I submit the draft of REST API doc, we can discuss about these issues.
>
>
>
>>
>> Thanks,
>> Vijay
>>
>>> [1]
>>>
>>> http://www.gluster.org/community/documentation/index.php/Features/rest-api
>>> [2] http://review.gluster.org/#/c/7860/
>>> [3] https://github.com/skyrings/
>>> [4] https://gist.github.com/aravindavk/6961564b4b1d966b8845
>>>
>>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel@xxxxxxxxxxx
> http://www.gluster.org/mailman/listinfo/gluster-devel
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux