Re: Writing a new xlator is made a bit easier now

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

 



Nice tool.

Instead of editing main config.py directly, add new parameter for config. So that actual config is intact for next time.

Steps to customize,
cp config.py compression_config.py
python ./generate_xlator.py /home/u1/glusterfs/xlators/features compression cmpr compression_config.py

regards
Aravinda

On 12/24/2015 11:32 AM, Poornima Gurusiddaiah wrote:
Hi All,

Here is a patch http://review.gluster.org/#/c/13061/ that creates the initial template for any new xlator that you wish to write.

How to use:
$ python ./generate_xlator.py <XLATOR_DIRECTORY> <XLATOR_NAME> <FOP_SUFFIX>

Eg: python ./generate_xlator.py /home/u1/glusterfs/xlators/features compression cmpr
This command will create the following files with some initial contents like copyright, fops definition, header definition etc. :
* /home/u1/glusterfs/xlators/features/compression/Makefile.am
* /home/u1/glusterfs/xlators/features/compression/src/Makefile.am
* /home/u1/glusterfs/xlators/features/compression/src/compression.c
* /home/u1/glusterfs/xlators/features/compression/src/compression.h
* /home/u1/glusterfs/xlators/features/compression/src/compression-mem-types.h
* /home/u1/glusterfs/xlators/features/compression/src/compression-messages.h

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`.
One can customize the fop definition by changing CBK_TEMPLATE/FOP_TEMPLATE in generate_xlator.py.

This is an addition to Jeff's http://review.gluster.org/#/c/9411/
Reviews are welcome.

Merry Christmas:)

Regards,
Poornima





_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux