<html><body><div style="font-family: garamond,new york,times,serif; font-size: 12pt; color: #000000"><div>Cool stuff! :)</div><div><br></div><div>-Krutika</div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Poornima Gurusiddaiah" &lt;pgurusid@redhat.com&gt;<br><b>To: </b>"Gluster Devel" &lt;gluster-devel@gluster.org&gt;<br><b>Sent: </b>Thursday, December 24, 2015 11:32:15 AM<br><b>Subject: </b>[Gluster-devel] Writing a new xlator is made a bit easier now<br><div><br></div>Hi All, <br><div><br></div>Here is a patch http://review.gluster.org/#/c/13061/ that creates the initial template for any new xlator that you wish to write. <br><div><br></div>How to use: <br>$ python ./generate_xlator.py &lt;XLATOR_DIRECTORY&gt; &lt;XLATOR_NAME&gt; &lt;FOP_SUFFIX&gt; <br><div><br></div>Eg: python ./generate_xlator.py /home/u1/glusterfs/xlators/features compression cmpr<br>This command will create the following files with some initial contents like copyright, fops definition, header definition etc. : <br>* /home/u1/glusterfs/xlators/features/compression/Makefile.am <br>* /home/u1/glusterfs/xlators/features/compression/src/Makefile.am <br>* /home/u1/glusterfs/xlators/features/compression/src/compression.c <br>* /home/u1/glusterfs/xlators/features/compression/src/compression.h <br>* /home/u1/glusterfs/xlators/features/compression/src/compression-mem-types.h <br>* /home/u1/glusterfs/xlators/features/compression/src/compression-messages.h <br><div><br></div>By default all the fops and other functions are generated, if you do not need to implement certain functions, delete those functions from the the file `config.py`. <br>One can customize the fop definition by changing CBK_TEMPLATE/FOP_TEMPLATE in generate_xlator.py.<br><div><br></div>This is an addition to Jeff's http://review.gluster.org/#/c/9411/<br>Reviews are welcome.<br><div><br></div>Merry Christmas:)<br><div><br></div>Regards,<br>Poornima<br><div><br></div><br><div><br></div><br><div><br></div>_______________________________________________<br>Gluster-devel mailing list<br>Gluster-devel@gluster.org<br>http://www.gluster.org/mailman/listinfo/gluster-devel<br></blockquote><div><br></div></div></body></html>