From 432cecfbff496bfa9e71e8cbbed789458656c553 Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Tue, 29 Oct 2013 17:17:12 +0530 Subject: cli: add peerid to volume status xml output This patch adds tag to bricks and nfs/shd like services to volume status xml output. BUG: 955548 Change-Id: I9aaa9266e4d56f632235eaeef565e92d757c0694 Signed-off-by: Bala.FA Reviewed-on: http://review.gluster.org/6162 Tested-by: Gluster Build System Reviewed-by: Kaushal M --- cli/src/cli-xml-output.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 0f837fc74..0cbffb222 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -237,6 +237,7 @@ cli_xml_output_vol_status_common (xmlTextWriterPtr writer, dict_t *dict, int ret = -1; char *hostname = NULL; char *path = NULL; + char *uuid = NULL; int port = 0; int status = 0; int pid = 0; @@ -263,6 +264,15 @@ cli_xml_output_vol_status_common (xmlTextWriterPtr writer, dict_t *dict, "%s", path); XML_RET_CHECK_AND_GOTO (ret, out); + memset (key, 0, sizeof (key)); + snprintf (key, sizeof (key), "brick%d.peerid", brick_index); + ret = dict_get_str (dict, key, &uuid); + if (ret) + goto out; + ret = xmlTextWriterWriteFormatElement (writer, (xmlChar *)"peerid", + "%s", uuid); + XML_RET_CHECK_AND_GOTO (ret, out); + memset (key, 0, sizeof (key)); snprintf (key, sizeof (key), "brick%d.status", brick_index); ret = dict_get_int32 (dict, key, &status); -- cgit