diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-11-17 15:42:24 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-12-02 00:20:39 -0800 |
commit | da71bdcf82a8dc71a1170ad3f190702fa49d2838 (patch) | |
tree | e5e1c43307333475dd0bf5d255c44948e5815d3b /events/src/eventsapiconf.py.in | |
parent | 47e69455d3aede77960fd81a7cf3d6b4a869dbfa (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.
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>
Diffstat (limited to 'events/src/eventsapiconf.py.in')
-rw-r--r-- | events/src/eventsapiconf.py.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/events/src/eventsapiconf.py.in b/events/src/eventsapiconf.py.in index e0028761bcc..85fefebbbbf 100644 --- a/events/src/eventsapiconf.py.in +++ b/events/src/eventsapiconf.py.in @@ -26,3 +26,13 @@ UUID_FILE = "@GLUSTERD_WORKDIR@/glusterd.info" PID_FILE = "@localstatedir@/run/glustereventsd.pid" AUTO_BOOL_ATTRIBUTES = ["force", "push-pem", "no-verify"] AUTO_INT_ATTRIBUTES = ["ssh-port"] + +# Errors +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 |