da71bdcf82
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>
32 lines
943 B
Python
32 lines
943 B
Python
# -*- coding: utf-8 -*-
|
|
# Reexporting the utility funcs and classes
|
|
from cliutils import (runcli,
|
|
sync_file_to_peers,
|
|
execute_in_peers,
|
|
execute,
|
|
node_output_ok,
|
|
node_output_notok,
|
|
output_error,
|
|
oknotok,
|
|
yesno,
|
|
get_node_uuid,
|
|
Cmd,
|
|
GlusterCmdException,
|
|
set_common_args_func)
|
|
|
|
|
|
# This will be useful when `from cliutils import *`
|
|
__all__ = ["runcli",
|
|
"sync_file_to_peers",
|
|
"execute_in_peers",
|
|
"execute",
|
|
"node_output_ok",
|
|
"node_output_notok",
|
|
"output_error",
|
|
"oknotok",
|
|
"yesno",
|
|
"get_node_uuid",
|
|
"Cmd",
|
|
"GlusterCmdException",
|
|
"set_common_args_func"]
|