summaryrefslogtreecommitdiffstats
path: root/extras/cliutils/cliutils.py
Commit message (Collapse)AuthorAgeFilesLines
* eventsapi: Fix Exception class for Python3Aravinda VK2019-06-141-1/+8
| | | | | | | | | | | | | | | Python2 exception provides message attribute for custom exceptions. But it is not available in Python3. Add init method for custom exception to handle the same. Original crash(IndexError reported in the bug) was fixed with https://review.gluster.org/#/c/glusterfs/+/22294/ But that patch only works in Python2 and fails in Python3 since Exception in Python 3 doesn't have "message" attribute. Fixes: bz#1573226 Change-Id: If9117048f9ff0615f5da1880075ec12c0ff4855e Signed-off-by: Aravinda VK <avishwan@redhat.com>
* cliutils: python2 to python3 compatKotresh HR2018-10-301-1/+2
| | | | | | | | Make Popen py2 and py3 compatiable fixes: bz#1643935 Change-Id: Ife34cb38024dcdc0420436e7d76fd208223f9d86 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* eventsapi: JSON output and different error codesAravinda VK2016-12-021-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | JSON outputs are added to all commands, use `--json` to get JSON output. Following error codes are added to differenciate between errors. Any other Unknown errors will have return code 1 ERROR_SAME_CONFIG = 2 ERROR_ALL_NODES_STATUS_NOT_OK = 3 ERROR_PARTIAL_SUCCESS = 4 ERROR_WEBHOOK_ALREADY_EXISTS = 5 ERROR_WEBHOOK_NOT_EXISTS = 6 ERROR_INVALID_CONFIG = 7 ERROR_WEBHOOK_SYNC_FAILED = 8 ERROR_CONFIG_SYNC_FAILED = 9 Also hidden `node-` commands in the help message. BUG: 1357753 Change-Id: I962b5435c8a448b4573059da0eae42f3f93cc97e Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/15867 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* extras/cliutils: Utils for creating CLI tools for GlusterAravinda VK2016-07-121-0/+212
Refer README.md for documentation. BUG: 1342356 Change-Id: Ic88504177137136bbb4b8b2c304ecc4af9bcfe30 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14627 Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>