<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 15, 2018 at 2:53 AM, 陈曦 <span dir="ltr">&lt;<a href="mailto:mrchenx@126.com" target="_blank">mrchenx@126.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial"><div>I want to write a python script and visual interface to manage glusterfs, such as creating and deleting volumes.This can be easier to manage glusterfs。</div><div>But,now ,I execute the glusterfs command using python&#39;s subprocess.popen function,such as subprocess.Popen(GLUSTER_<wbr>CMD, shell=True,stdout=subprocess.<wbr>PIPE, stderr=subprocess.PIPE)......</div><div>But this does not feel like a good program, Because it has a serious dependence on the shell</div><div>Is there a python or c library/function to execute the glusterfs command?So I can develop a better performance, more lightweight script. to achieve this optimization script</div><div><br></div></div></blockquote><div><br></div><div><br></div><div>glusterd2 will provide ReSTful APIs [1] for volume management and will be available from 4.0. That could be easier for invoking from python.</div><div><br></div><div>Regards,</div><div>Vijay</div><div><br></div><div>[1] <a href="https://github.com/gluster/glusterd2/wiki/ReST-API">https://github.com/gluster/glusterd2/wiki/ReST-API</a></div></div></div></div>