summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-05-06 18:18:25 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-07 08:57:07 -0700
commit641e91fa83ae70514745d55728e1e32a740c2401 (patch)
tree25a8261ed1d5a4fffaa627e7021f13f9bc1b02dc /cli
parent2eaea122a52b844b2c610ece96e7a33341ca7c5d (diff)
tiering/cli: while attaching tier to volume cli should ask question
Because of tiering feature is recommended only for testing purpose in this release, attaching tier should get a confirmation from the user before proceeding with the command. Change-Id: I141bbb1d0439f0a28eb51d17f7800908e35c75ad BUG: 1219057 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/10613 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-volume.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 6458d04208d..c9c6b65f35f 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -845,14 +845,23 @@ cli_cmd_volume_attach_tier_cbk (struct cli_state *state,
dict_t *options = NULL;
int sent = 0;
int parse_error = 0;
- gf_answer_t answer = GF_ANSWER_NO;
cli_local_t *local = NULL;
int type = 0;
+ char *question = "Attach tier is recommended only "
+ "for testing purposes in this "
+ "release. Do you want to continue?";
+ gf_answer_t answer = GF_ANSWER_NO;
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
goto out;
+ answer = cli_cmd_get_confirmation (state, question);
+ if (GF_ANSWER_NO == answer) {
+ ret = 0;
+ goto out;
+ }
+
ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options, &type);
if (ret) {
cli_usage_out (word->pattern);