diff options
author | Rajesh Joseph <rjoseph@redhat.com> | 2015-08-26 08:28:59 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2015-08-31 23:40:52 -0700 |
commit | eb33931e4f7f57af87e307d36baba5084cd97da8 (patch) | |
tree | e406f7ece21f42a0bc47db191fd6a1730b6db59b /xlators | |
parent | c00872cbff0ec2d7472d7c191e817f4e55f4ec9f (diff) |
gluster/cli: snapshot delete all does not work with xml
Backport of http://review.gluster.org/#/c/12027/
Problem: snapshot delete all command fails with --xml option
Fix: Provided xml support for delete all command
Change-Id: I77cad131473a9160e188c783f442b6a38a37f758
BUG: 1258113
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/12027
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
(cherry picked from commit fd47635a4ffab621a2357c99cd1edd0482940bd5)
Reviewed-on: http://review.gluster.org/12042
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index f9a01f31e63..a957377b1a6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -5506,15 +5506,16 @@ glusterd_handle_snapshot_delete (rpcsvc_request_t *req, glusterd_op_t op, GF_ASSERT (err_str); GF_VALIDATE_OR_GOTO (this->name, op_errno, out); - ret = dict_get_int32 (dict, "delete-cmd", &delete_cmd); + ret = dict_get_int32 (dict, "sub-cmd", &delete_cmd); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, - GD_MSG_COMMAND_NOT_FOUND, "Failed to get delete-cmd"); + GD_MSG_COMMAND_NOT_FOUND, "Failed to get sub-cmd"); goto out; } switch (delete_cmd) { case GF_SNAP_DELETE_TYPE_SNAP: + case GF_SNAP_DELETE_TYPE_ITER: ret = glusterd_handle_snapshot_delete_type_snap (req, op, dict, err_str, op_errno, len); @@ -5647,7 +5648,7 @@ glusterd_snapshot_status_prevalidate (dict_t *dict, char **op_errstr, goto out; } - ret = dict_get_int32 (dict, "status-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, @@ -7531,7 +7532,7 @@ glusterd_snapshot_status_commit (dict_t *dict, char **op_errstr, conf = this->private; GF_ASSERT (conf); - ret = dict_get_int32 (dict, "status-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, @@ -7539,7 +7540,7 @@ glusterd_snapshot_status_commit (dict_t *dict, char **op_errstr, goto out; } - ret = dict_set_int32 (rsp_dict, "status-cmd", cmd); + ret = dict_set_int32 (rsp_dict, "sub-cmd", cmd); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_SET_FAILED, |