diff options
Diffstat (limited to 'cli/src/cli.h')
| -rw-r--r-- | cli/src/cli.h | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h index 0221f2e85..8daa4b741 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -18,6 +18,7 @@ #include "rpc-clnt.h" #include "glusterfs.h" #include "protocol-common.h" +#include "logging.h" #include "cli1-xdr.h" @@ -30,9 +31,8 @@ #define CLI_GLUSTERD_PORT 24007 #define CLI_DEFAULT_CONN_TIMEOUT 120 #define CLI_DEFAULT_CMD_TIMEOUT 120 -#define CLI_TOP_CMD_TIMEOUT 600 //Longer timeout for volume top +#define CLI_TEN_MINUTES_TIMEOUT 600 //Longer timeout for volume top #define DEFAULT_CLI_LOG_FILE_DIRECTORY DATADIR "/log/glusterfs" -#define DEFAULT_LOG_FILE_DIRECTORY DATADIR "/log/glusterfs" #define CLI_VOL_STATUS_BRICK_LEN 55 #define CLI_TAB_LENGTH 8 #define CLI_BRICK_STATUS_LINE_LEN 78 @@ -52,6 +52,7 @@ struct cli_cmd; extern char *cli_vol_type_str[]; extern char *cli_vol_status_str[]; +extern char *cli_vol_task_status_str[]; typedef int (cli_cmd_cbk_t)(struct cli_state *state, struct cli_cmd_word *word, @@ -114,6 +115,8 @@ struct cli_state { char *log_file; gf_loglevel_t log_level; + + char *glusterd_sock; }; struct cli_local { @@ -128,11 +131,23 @@ struct cli_local { gf_boolean_t all; #if (HAVE_LIB_XML) xmlTextWriterPtr writer; - xmlBufferPtr buf; + xmlDocPtr doc; int vol_count; #endif }; +struct gf_cli_gsync_detailed_status_ { + char *node; + char *master; + char *slave; + char *health; + char *uptime; + char *files_syncd; + char *files_pending; + char *bytes_pending; + char *deletes_pending; +}; + struct cli_volume_status { int port; int online; @@ -151,6 +166,13 @@ struct cli_volume_status { #endif }; +struct snap_config_opt_vals_ { + char *op_name; + char *question; +}; + +typedef struct gf_cli_gsync_detailed_status_ gf_cli_gsync_status_t; + typedef struct cli_volume_status cli_volume_status_t; typedef struct cli_local cli_local_t; @@ -215,7 +237,7 @@ cli_cmd_quota_parse (const char **words, int wordcount, dict_t **opt); int32_t cli_cmd_volume_set_parse (const char **words, int wordcount, - dict_t **options); + dict_t **options, char **op_errstr); int32_t cli_cmd_volume_add_brick_parse (const char **words, int wordcount, @@ -361,4 +383,18 @@ cli_xml_output_vol_create (dict_t *dict, int op_ret, int op_errno, int cli_xml_output_generic_volume (char *op, dict_t *dict, int op_ret, int op_errno, char *op_errstr); + +int +cli_xml_output_vol_gsync (dict_t *dict, int op_ret, int op_errno, + char *op_errstr); +int +cli_xml_output_vol_status_tasks_detail (cli_local_t *local, dict_t *dict); + +char * +is_server_debug_xlator (void *myframe); + +int32_t +cli_cmd_snapshot_parse (const char **words, int wordcount, dict_t **options, + struct cli_state *state); + #endif /* __CLI_H__ */ |
