summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2015-08-26 08:28:59 +0530
committerRajesh Joseph <rjoseph@redhat.com>2015-08-28 22:10:58 -0700
commitfd47635a4ffab621a2357c99cd1edd0482940bd5 (patch)
tree669b416af52a6b6c4b3bbd23bdca3c555ed0509c /xlators
parent31a36dca20a976b143cc5c970e115d8d36df847a (diff)
gluster/cli: snapshot delete all does not work with xml
Problem: snapshot delete all command fails with --xml option Fix: Provided xml support for delete all command Change-Id: I77cad131473a9160e188c783f442b6a38a37f758 BUG: 1257533 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>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c11
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 131f7dbbe16..2aef46287cf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -5502,15 +5502,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);
@@ -5643,7 +5644,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,
@@ -7527,7 +7528,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,
@@ -7535,7 +7536,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,