diff options
author | Gaurav Kumar Garg <ggarg@redhat.com> | 2015-05-06 18:18:25 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-07 20:12:41 -0700 |
commit | d914cd909b9a99d7645b633000940195277bb6ff (patch) | |
tree | 64e0517e724fd13a147c6625b51242615c8919c1 /cli/src/cli-cmd-volume.c | |
parent | 768b86a269378e66f9378295073740ff6e0cb02e (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: 1219032
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/10610
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index d121ac94739..ba4aac49393 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -892,14 +892,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); |