diff options
| author | Kaushal M <kaushal@redhat.com> | 2012-03-05 19:04:49 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vijay@gluster.com> | 2012-03-13 04:00:07 -0700 | 
| commit | 8c7549f9094d99d679de447230edaa5040db3e92 (patch) | |
| tree | 4e372bf9cd91d25dc19d5c1ddfd58c3101d1753b /cli/src/cli.h | |
| parent | 6a8fcff3fb6955162dc4eeaeaa627bb31311627e (diff) | |
cli: More xml output changes
* Added xml output for "volume quota" which was missing.
* Fixed xml output for "volume info all" so that it contains only one xml
  document
* Fixed no xml output for normal "volume status"
* Fixed normal output for "volume set"
Change-Id: I3d85b6800e428226f2970d669e38e4331c99a218
BUG: 799957
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/2868
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli/src/cli.h')
| -rw-r--r-- | cli/src/cli.h | 43 | 
1 files changed, 36 insertions, 7 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h index 8080e42d699..2a24378ffa1 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -29,12 +29,18 @@  #include "glusterfs.h"  #include "protocol-common.h" +#if (HAVE_LIB_XML) +#include <libxml/encoding.h> +#include <libxml/xmlwriter.h> +#endif +  #define DEFAULT_EVENT_POOL_SIZE            16384  #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 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 @@ -122,6 +128,11 @@ struct cli_local {          } get_vol;          dict_t          *dict; +#if (HAVE_LIB_XML) +        xmlTextWriterPtr        writer; +        xmlBufferPtr            buf; +        int                     vol_count; +#endif  };  struct cli_volume_status { @@ -276,25 +287,43 @@ 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); +cli_xml_output_str (char *op, char *str, int op_ret, int op_errno, +                    char *op_errstr); + +int +cli_xml_output_dict (char *op, dict_t *dict, int op_ret, int op_errno, +                     char *op_errstr); + +int +cli_xml_output_vol_top (dict_t *dict, int op_ret, int op_errno, +                        char *op_errstr); + +int +cli_xml_output_vol_profile (dict_t *dict, int op_ret, int op_errno, +                            char *op_errstr);  int -cli_xml_output_dict (char *op, dict_t *dict, int op_ret, int op_errno, char *op_errstr); +cli_xml_output_vol_status (dict_t *dict, int op_ret, int op_errno, +                           char *op_errstr);  int -cli_xml_output_vol_top (dict_t *dict, int op_ret, int op_errno, char *op_errstr); +cli_xml_output_vol_list (dict_t *dict, int op_ret, int op_errno, +                         char *op_errstr);  int -cli_xml_output_vol_profile (dict_t *dict, int op_ret, int op_errno, char *op_errstr); +cli_xml_output_vol_info_begin (cli_local_t *local, 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_info_end (cli_local_t *local);  int -cli_xml_output_vol_list (dict_t *dict, int op_ret, int op_errno, char *op_errstr); +cli_xml_output_vol_info (cli_local_t *local, dict_t *dict);  int -cli_xml_output_vol_info (dict_t *dict, int op_ret, int op_errno, char *op_errstr); +cli_xml_output_vol_quota_limit_list (char *volname, char *limit_list, +                                      int op_ret, int op_errno, +                                      char *op_errstr);  #endif  #endif /* __CLI_H__ */  | 
