diff options
author | Kaushal M <kaushal@redhat.com> | 2012-08-29 14:43:30 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-09-01 11:53:36 -0700 |
commit | fad24c87cef0cc40c661614cd1cf1ab936311dcb (patch) | |
tree | c66a04af61efa21767de4cbeab705e8203234234 /xlators/mgmt | |
parent | b10eea2c44272bf491b670466430f4a6d1ac364b (diff) |
cli, glusterd: Changes to 'peer status' xml output
Glusterd now returns the status of a peer as both a string and a number.
The xml output for peer status has been modified, such that the <status> element
now contains the status number and a new <statusStr> element contains the status
string.
Change-Id: I0d4b74b84a991893d1029b8408d66ff078bbd254
BUG: 847760
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3868
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 9f6659bda75..8804176dcc6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -247,6 +247,11 @@ glusterd_add_peer_detail_to_dict (glusterd_peerinfo_t *peerinfo, if (ret) goto out; + snprintf (key, 256, "friend%d.stateId", count); + ret = dict_set_int32 (friends, key, peerinfo->state.state); + if (ret) + goto out; + snprintf (key, 256, "friend%d.state", count); ret = dict_set_str (friends, key, glusterd_friend_sm_state_name_get(peerinfo->state.state)); |