diff options
author | Bala.FA <barumuga@redhat.com> | 2013-10-29 17:17:12 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-14 23:31:32 -0800 |
commit | 432cecfbff496bfa9e71e8cbbed789458656c553 (patch) | |
tree | 10cc9c84b2321e933c965cd65721ed480e0e067a /cli/src | |
parent | 884a668a9c3e12e17d64ebd5ccd9fbf3d203fd1e (diff) |
cli: add peerid to volume status xml output
This patch adds <peerid> tag to bricks and nfs/shd like services to
volume status xml output.
BUG: 955548
Change-Id: I9aaa9266e4d56f632235eaeef565e92d757c0694
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/6162
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-xml-output.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 0f837fc7428..0cbffb22233 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; @@ -264,6 +265,15 @@ cli_xml_output_vol_status_common (xmlTextWriterPtr writer, dict_t *dict, 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); if (ret) |