snapshot/cli: Keep the dict keys uniform

snapshot info was using a different dictionary key
as compared to other snapshot commands. This was
throwing a recurring error log in cli.log

Change-Id: I9eb9a4541c10a45ec7673a23c89c85a7dce9f3ec
BUG: 1316819
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/13677
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
This commit is contained in:
Avra Sengupta 2016-03-11 14:01:31 +05:30 committed by Rajesh Joseph
parent d9b5fef033
commit 1af963dc75
2 changed files with 2 additions and 2 deletions

View File

@ -4182,7 +4182,7 @@ cli_snap_info_parse (dict_t *dict, const char **words, int wordcount)
cmd = GF_SNAP_INFO_TYPE_VOL;
out:
if (ret == 0) {
ret = dict_set_int32 (dict, "cmd", cmd);
ret = dict_set_int32 (dict, "sub-cmd", cmd);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Could not save "
"type of snapshot info");

View File

@ -3683,7 +3683,7 @@ glusterd_handle_snapshot_info (rpcsvc_request_t *req, glusterd_op_t op,
GF_VALIDATE_OR_GOTO (this->name, dict, out);
ret = dict_get_int32 (dict, "cmd", &cmd);
ret = dict_get_int32 (dict, "sub-cmd", &cmd);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
GD_MSG_DICT_GET_FAILED, "Failed to get type "