gluster-devel
[Top][All Lists]
Advanced

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

[Gluster-devel] gluster-rest, a RESTful web api server for gluster


From: Kaushal M
Subject: [Gluster-devel] gluster-rest, a RESTful web api server for gluster
Date: Wed, 6 Mar 2013 17:19:03 +0530

Hey everyone,

I did a quick hack in go about a month ago and gluster-rest was the outcome. You can find it at https://github.com/kshlm/gluster-rest

The program is basically a wrapper around the gluster cli. It translates incoming requests to the correct gluster cli command, executes the cli command with the '--xml' parameter to get xml output and returns the xml document.

For eg, 
For getting volume info, do a GET request on '<hostname>:<port>/gluster/volume/info/<volname>'.
For getting volume status, do a GET request on '<hostname>:<port>/gluster/volume/status/<volname>'

You just replace all the spaces in a gluster command by '/'s and prepend server information to get the URI for the request. This doesn't work with commands which take bricks as args (no way to escape the '/'s in brick paths), so they don't work for now. Also, proper errors are not returned.

There is still a lot to do, to make this acceptable for normal usage.

Have a look at this, run it, and if you have any comments, ideas etc., just let me know.

Regards,
Kaushal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]