diff options
| author | Aravinda VK <avishwan@redhat.com> | 2016-11-17 15:42:24 +0530 |
|---|---|---|
| committer | Aravinda VK <avishwan@redhat.com> | 2016-12-28 22:27:15 -0800 |
| commit | d8a19cede65f38cf48b9e1724a7f20b01672fe4e (patch) | |
| tree | d587a1ca69d7b7a4541a7cb04455af94e7b18256 /extras/cliutils/__init__.py | |
| parent | 544f6ce9e7a249360166e98dd7df1b09f91717a9 (diff) | |
eventsapi: JSON output and different error codes
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.
> 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>
BUG: 1400845
Change-Id: I962b5435c8a448b4573059da0eae42f3f93cc97e
Signed-off-by: Aravinda VK <avishwan@redhat.com>
(cherry picked from commit da71bdcf82a8dc71a1170ad3f190702fa49d2838)
Reviewed-on: http://review.gluster.org/16008
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>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'extras/cliutils/__init__.py')
| -rw-r--r-- | extras/cliutils/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/cliutils/__init__.py b/extras/cliutils/__init__.py index 4bb8395bb46..9c930982be0 100644 --- a/extras/cliutils/__init__.py +++ b/extras/cliutils/__init__.py @@ -11,7 +11,8 @@ from cliutils import (runcli, yesno, get_node_uuid, Cmd, - GlusterCmdException) + GlusterCmdException, + set_common_args_func) # This will be useful when `from cliutils import *` @@ -26,4 +27,5 @@ __all__ = ["runcli", "yesno", "get_node_uuid", "Cmd", - "GlusterCmdException"] + "GlusterCmdException", + "set_common_args_func"] |
