summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorVijaikumar M <vmallika@redhat.com>2014-03-25 15:44:56 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-03-25 03:32:21 -0700
commite078092e827807aec0eef185198771f49f809b34 (patch)
tree5eea84d1266cf2261cd8a9acb39e2262742013bc /cli/src
parentcb9bb522972b6cff45c0b6646100151e30e6424c (diff)
snapshot: cleanup unwanted CG-code
Change-Id: Id3da2a7aac84027aeff050f6dd9a3484719362bc BUG: 1073780 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7204 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-rpc-ops.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index e8cda53..6774311 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -7535,12 +7535,8 @@ out:
int32_t
cli_snapshot_remove_reply (gf_cli_rsp *rsp, dict_t *dict, call_frame_t *frame)
{
- int32_t ret = -1;
- char *snap_name = NULL;
- char *cg_name = NULL;
- int64_t volcount = -1;
- char *volname = NULL;
- gf_boolean_t is_cg = _gf_false;
+ int32_t ret = -1;
+ char *snap_name = NULL;
GF_ASSERT (rsp);
GF_ASSERT (dict);
@@ -7554,35 +7550,14 @@ cli_snapshot_remove_reply (gf_cli_rsp *rsp, dict_t *dict, call_frame_t *frame)
goto out;
}
- ret = dict_get_int64 (dict, "volcount", &volcount);
- if (!ret) {
- if (volcount == 1) {
- ret = dict_get_str (dict, "volname1", &volname);
- if (ret)
- gf_log ("", GF_LOG_WARNING, "getting volume name"
- " failed");
- } else
- is_cg = _gf_true;
- }
-
- if (is_cg) {
- if (dict_get_str (dict, "cgname",
- &cg_name) != 0)
- cg_name = "???";
-
- cli_out ("snapshot delete: %s: consistency "
- "group removed successfully",
- cg_name);
- } else {
- if (dict_get_str (dict, "snapname",
- &snap_name) != 0)
- snap_name = "???";
-
- cli_out ("snapshot delete: %s: "
- "snap removed successfully",
- snap_name);
+ ret = dict_get_str (dict, "snapname", &snap_name);
+ if (ret) {
+ gf_log ("cli", GF_LOG_ERROR, "Failed to get snapname");
+ goto out;
}
+ cli_out ("snapshot delete: %s: snap removed successfully",
+ snap_name);
ret = 0;
out: