From 81d4aa18b3a1cdad0e0e8df43fe4c8c141c06618 Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Mon, 5 Oct 2015 16:17:02 +0530 Subject: gluster v status --xml for a replicated hot tier volume 0 0 tiervol 11 10.70.42.203 /data/gluster/tier/b5_2 149ac603-8078-41c5-8f71-7373f2a3016f 1 49164 49164 N/A 8684 10.70.42.203 /data/gluster/tier/b5_1 149ac603-8078-41c5-8f71-7373f2a3016f 1 49163 49163 N/A 8687 10.70.42.203 /data/gluster/tier/b4_2 149ac603-8078-41c5-8f71-7373f2a3016f 1 49162 49162 N/A 8699 10.70.42.203 /data/gluster/tier/b4_1 149ac603-8078-41c5-8f71-7373f2a3016f 1 49161 49161 N/A 8708 10.70.42.203 /data/gluster/tier/b1_1 149ac603-8078-41c5-8f71-7373f2a3016f 1 49155 49155 N/A 8716 10.70.42.203 /data/gluster/tier/b1_2 149ac603-8078-41c5-8f71-7373f2a3016f 1 49156 49156 N/A 8724 NFS Server localhost 149ac603-8078-41c5-8f71-7373f2a3016f 1 2049 2049 N/A 8678 Tier migration 975bfcfa-077c-4edb-beba-409c2013f637 1 in progress Change-Id: I69252a36b6e6b2f3cbe5db06e9a716f504a1dba4 BUG: 1268810 Signed-off-by: hari gowtham Reviewed-on: http://review.gluster.org/12302 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Anand Nekkunti Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- cli/src/cli-xml-output.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'cli/src') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 87bd0589bb9..9fa13c8279b 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -1668,15 +1668,19 @@ cli_xml_output_vol_status (cli_local_t *local, dict_t *dict) goto out; ret = xmlTextWriterStartElement - (local->writer, (xmlChar *)"hotBrick"); + (local->writer, (xmlChar *)"hotBricks"); XML_RET_CHECK_AND_GOTO (ret, out); } for (i = 0; i <= index_max; i++) { - if (type == GF_CLUSTER_TYPE_TIER && i >= hot_brick_count) { + if (type == GF_CLUSTER_TYPE_TIER && i == hot_brick_count) { + + /* */ + ret = xmlTextWriterEndElement (local->writer); + XML_RET_CHECK_AND_GOTO (ret, out); ret = xmlTextWriterStartElement (local->writer, - (xmlChar *)"coldBrick"); + (xmlChar *)"coldBricks"); XML_RET_CHECK_AND_GOTO (ret, out); } ret = cli_xml_output_vol_status_common (local->writer, dict, i, @@ -1749,16 +1753,13 @@ cli_xml_output_vol_status (cli_local_t *local, dict_t *dict) ret = xmlTextWriterEndElement (local->writer); XML_RET_CHECK_AND_GOTO (ret, out); - if (type == GF_CLUSTER_TYPE_TIER && i < hot_brick_count) { - ret = xmlTextWriterEndElement (local->writer); - XML_RET_CHECK_AND_GOTO (ret, out); - } - if (type == GF_CLUSTER_TYPE_TIER && i >= hot_brick_count) { - ret = xmlTextWriterEndElement (local->writer); - XML_RET_CHECK_AND_GOTO (ret, out); - } } + /* */ + if (type == GF_CLUSTER_TYPE_TIER && i >= hot_brick_count) { + ret = xmlTextWriterEndElement (local->writer); + XML_RET_CHECK_AND_GOTO (ret, out); + } /* Tasks are only present when a normal volume status call is done on a * single volume or on all volumes -- cgit