<div dir="ltr">Hey everyone,<div><br></div><div>I did a quick hack in go about a month ago and gluster-rest was the outcome. You can find it at <a href="https://github.com/kshlm/gluster-rest">https://github.com/kshlm/gluster-rest</a></div>
<div><br></div><div>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 &#39;--xml&#39; parameter to get xml output and returns the xml document.</div>
<div><br></div><div style>For eg, </div><div style>For getting volume info, do a GET request on &#39;&lt;hostname&gt;:&lt;port&gt;/gluster/volume/info/&lt;volname&gt;&#39;.</div><div style>For getting volume status, do a GET request on &#39;&lt;hostname&gt;:&lt;port&gt;/gluster/volume/status/&lt;volname&gt;&#39;</div>
<div style><br></div><div style>You just replace all the spaces in a gluster command by &#39;/&#39;s and prepend server information to get the URI for the request. This doesn&#39;t work with commands which take bricks as args (no way to escape the &#39;/&#39;s in brick paths), so they don&#39;t work for now. Also, proper errors are not returned.</div>
<div style><br></div><div style>There is still a lot to do, to make this acceptable for normal usage.</div><div style><br></div><div style>Have a look at this, run it, and if you have any comments, ideas etc., just let me know.</div>
<div style><br></div><div style>Regards,</div><div style>Kaushal</div></div>