diff options
author | vmallika <vmallika@redhat.com> | 2015-06-15 12:31:48 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-07-07 09:11:38 -0700 |
commit | c9e92231e8fb31e6e4a9f061746daaedd77ad1b7 (patch) | |
tree | e5598f0a0bbf7ce7b67e9358997bd283b9ef7aff /cli/src/cli.h | |
parent | 5c8ee98a2dc6e7754ad37adcfd3a0e04014f266c (diff) |
features/quota : Fix XML output for quota list command
This is a backport of http://review.gluster.org/#/c/9481/
> Sample output:
> ---------------
>
> Sample 1)
> ----------
> [root@snapshot-28 glusterfs]# gluster volume quota vol1 list /dir1 /dir4
> /dir5 --xml
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <cliOutput>
> <opRet>0</opRet>
> <opErrno>0</opErrno>
> <opErrstr/>
> <volQuota>
> <limit>
> <path>/dir1</path>
> <hard_limit>10.0MB</hard_limit>
> <soft_limit>80%</soft_limit>
> <used_space>0Bytes</used_space>
> <avail_space>10.0MB</avail_space>
> </limit>
> <limit>
> <path>/dir4</path>
> <path>No such file or directory</path>
> </limit>
> <limit>
> <path>/dir5</path>
> <path>No such file or directory</path>
> </limit>
> </volQuota>
> </cliOutput>
>
> Sample 2)
> ---------
> gluster volume quota vol1 list --xml
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <cliOutput>
> <opRet>0</opRet>
> <opErrno>0</opErrno>
> <opErrstr/>
> <volQuota/>
> </cliOutput>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <cliOutput>
> <volQuota>
> <limit>
> <path>/dir</path>
> <hard_limit>10.0MB</hard_limit>
> <soft_limit>80%</soft_limit>
> <used_space>0Bytes</used_space>
> <avail_space>10.0MB</avail_space>
> </limit>
> <limit>
> <path>/dir1</path>
> <hard_limit>10.0MB</hard_limit>
> <soft_limit>80%</soft_limit>
> <used_space>0Bytes</used_space>
> <avail_space>10.0MB</avail_space>
> </limit>
> </volQuota>
> </cliOutput>
>
> Change-Id: I8a8d83cff88f778e5ee01fbca07d9f94c412317a
> BUG: 1185259
> Signed-off-by: Sachin Pandit <spandit@redhat.com>
> Reviewed-on: http://review.gluster.org/9481
> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Kaushal M <kaushal@redhat.com>
Change-Id: Ibdf51db626a07e68b5ace98140877f6d21918c20
BUG: 1231641
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11220
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'cli/src/cli.h')
-rw-r--r-- | cli/src/cli.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h index 73d23d684db..c4f9f98e5cf 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -348,9 +348,18 @@ int cli_xml_output_vol_info (cli_local_t *local, dict_t *dict); int -cli_xml_output_vol_quota_limit_list (char *volname, char *limit_list, - int op_ret, int op_errno, - char *op_errstr); +cli_xml_output_vol_quota_limit_list_begin (cli_local_t *local, int op_ret, + int op_errno, char *op_errstr); +int +cli_xml_output_vol_quota_limit_list_end (cli_local_t *local); + +int +cli_quota_list_xml_error (cli_local_t *local, char *path, + char *errstr); + +int +cli_quota_xml_output (cli_local_t *local, char *path, char *hl_str, + char *sl_final, void *used, void *avail); int cli_xml_output_peer_status (dict_t *dict, int op_ret, int op_errno, |