A project to provide Python wrappers for Gluster CLI commands.
These wrappers helps to integrate with external python projects
easily. For example to start a Gluster volume "gv1" from gluster.cli import volume try: volume.start("gv1") except GlusterCmdException as e: print "Volume start failed:", e These wrappers does additional processing compared to raw Gluster xml outputs to provide meaningful data. For example, georep.status joins `gluster volume info` and `gluster georep status` to return output in sorted order same as Volume info and to show offline status. volume.status_detail which runs `gluster volume info` and `gluster volume status detail` and merges the output to show the offline bricks status. Repo: ----- https://github.com/gluster/glustercli-python Install: -------- Install using pip command `sudo pip install glustercli` (https://pypi.python.org/pypi/glustercli) What is available: ------------------- Volume Operations: start/stop/restart/create/delete/info/status_detail/optset/optreset/log_rotate/sync/clear_locks/barrier_enable/barrier_disable/profile_start/profile_stop/profile_info Geo-rep Operations: gsec_create/create/start/stop/restart/delete/pause/resume/config_set/config_reset/status Snapshot operations: activate/clone/create/deactivate/delete/restore/config Rebalance operations: fix_layout_start/start/stop/status Quota operations: inode_quota_enable/enable/disable/remove_path/remove_objects/default_soft_limit/limit_usage/limit_objects/alert_time/soft_timeout/hard_timeout Peer operations: probe/attach/detach/status/pool NFS Ganesha: enable/disable Heal operations: enable/disable/full/split_brain Bricks operations: add/remove_start/remove_stop/remove_commit/replace_commit Bitrot operations: enable/disable/scrub_throttle/scrub_frequency/scrub_pause/scrub_resume Tier operations: start/attach/detach_start/detach_stop/detach_commit Who is using: ------------- Gluster management REST APIs project: https://github.com/gluster/restapi Gluster Geo-replication tools: http://aravindavk.in/blog/gluster-georep-tools Call for participation: ----------------------- - Integration with external projects - Fedora/Ubuntu and other distributions packaging - API documentation - Tests - Following wrappers to be implemented, feel free to send pull requests($SRC/gluster/cli/parsers.py) - Bitrot scrub status - Rebalance Status - Quota List Paths - Quota List Objects - Geo-rep Config Get - Remove Brick status - Tier detach status - Tier status - Volumes List - Heal info - Heal Statistics - Snapshot status - Snapshot info - Snapshot List - Volume options Thanks to Xiaohui Liu(xiaohui) for Volume profile output parsing and peer list parsing pull requests https://github.com/gluster/glustercli-python/commit/bb7cad16d244101f0f298b6359fa053ca4755808 https://github.com/gluster/glustercli-python/commit/f4f0a8c7540bb94af6a9b486baaa2a2fe67c5d04 -- regards Aravinda http://aravindavk.in |
_______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-devel