diff options
| author | Kaushal M <kaushal@redhat.com> | 2012-09-06 13:08:00 +0530 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2012-10-11 16:34:16 -0700 | 
| commit | f1f3d1c62d1e066c065f250caa0fc005b66dba37 (patch) | |
| tree | c8956a9dd3c4df49ad4500f84b3333c3cb8c410e /cli/src/cli.h | |
| parent | 6be13228c45188b104ffde22cee36fb24db8484d (diff) | |
cli: Changes and enhancements to XML output
This patch contains several xml related changes which fix some bugs and
introduce xml output for commands which were missing it. These include,
* XML output for rebalance & remove-brick status
* XML output for replace-brick
* XML output for 'volume status all' in on xml document
* proper XML output for "volume {create|start|stop|delete}"
* type & status of a volume in 'volume info' is now given as a string as well
This patch also cleans up the '#if (HAVE_LIB_XML)' sections from the code-base,
so that it is not littered around.
Change-Id: I5bb022adf0fedf7e3ead92b4b79bfa02b0b5fef5
BUG: 828131
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3869
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src/cli.h')
| -rw-r--r-- | cli/src/cli.h | 36 | 
1 files changed, 32 insertions, 4 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h index 7aa2148f494..0221f2e85e9 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -19,6 +19,8 @@  #include "glusterfs.h"  #include "protocol-common.h" +#include "cli1-xdr.h" +  #if (HAVE_LIB_XML)  #include <libxml/encoding.h>  #include <libxml/xmlwriter.h> @@ -48,6 +50,9 @@ struct cli_cmd_word;  struct cli_cmd_tree;  struct cli_cmd; +extern char *cli_vol_type_str[]; +extern char *cli_vol_status_str[]; +  typedef int (cli_cmd_cbk_t)(struct cli_state *state,                              struct cli_cmd_word *word,                              const char **words, @@ -288,7 +293,6 @@ cli_get_detail_status (dict_t *dict, int i, cli_volume_status_t *status);  void  cli_print_line (int len); -#if (HAVE_LIB_XML)  int  cli_xml_output_str (char *op, char *str, int op_ret, int op_errno,                      char *op_errstr); @@ -306,8 +310,14 @@ cli_xml_output_vol_profile (dict_t *dict, int op_ret, int op_errno,                              char *op_errstr);  int -cli_xml_output_vol_status (dict_t *dict, int op_ret, int op_errno, -                           char *op_errstr); +cli_xml_output_vol_status_begin (cli_local_t *local, int op_ret, int op_errno, +                                 char *op_errstr); + +int +cli_xml_output_vol_status_end (cli_local_t *local); + +int +cli_xml_output_vol_status (cli_local_t *local, dict_t *dict);  int  cli_xml_output_vol_list (dict_t *dict, int op_ret, int op_errno, @@ -331,6 +341,24 @@ cli_xml_output_vol_quota_limit_list (char *volname, char *limit_list,  int  cli_xml_output_peer_status (dict_t *dict, int op_ret, int op_errno,                              char *op_errstr); -#endif +int +cli_xml_output_vol_rebalance (gf_cli_defrag_type op, dict_t *dict, int op_ret, +                              int op_errno, char *op_errstr); + +int +cli_xml_output_vol_remove_brick (gf_boolean_t status_op, dict_t *dict, +                                 int op_ret, int op_errno, char *op_errstr); + +int +cli_xml_output_vol_replace_brick (gf1_cli_replace_op op, dict_t *dict, +                                  int op_ret, int op_errno, char *op_errstr); + +int +cli_xml_output_vol_create (dict_t *dict, int op_ret, int op_errno, +                           char *op_errstr); + +int +cli_xml_output_generic_volume (char *op, dict_t *dict, int op_ret, int op_errno, +                               char *op_errstr);  #endif /* __CLI_H__ */  | 
