<div dir="ltr">Nice one Poornima++ !!<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>--Humble<br></div><br></div></div></div>
<br><div class="gmail_quote">On Thu, Dec 24, 2015 at 11:32 AM, Poornima Gurusiddaiah <span dir="ltr">&lt;<a href="mailto:pgurusid@redhat.com" target="_blank">pgurusid@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
Here is a patch <a href="http://review.gluster.org/#/c/13061/" rel="noreferrer" target="_blank">http://review.gluster.org/#/c/13061/</a> that creates the initial template for any new xlator that you wish to write.<br>
<br>
How to use:<br>
$ python ./generate_xlator.py &lt;XLATOR_DIRECTORY&gt; &lt;XLATOR_NAME&gt; &lt;FOP_SUFFIX&gt;<br>
<br>
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>
<br>
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>
<br>
This is an addition to Jeff&#39;s <a href="http://review.gluster.org/#/c/9411/" rel="noreferrer" target="_blank">http://review.gluster.org/#/c/9411/</a><br>
Reviews are welcome.<br>
<br>
Merry Christmas:)<br>
<br>
Regards,<br>
Poornima<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br></div>