summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorjiffin tony thottan <jthottan@redhat.com>2015-12-07 14:38:54 +0530
committerNiels de Vos <ndevos@redhat.com>2016-02-22 04:46:11 -0800
commitc2462200ac3c3d49992561f2c9dd0fc55d1300c1 (patch)
tree97d8af19e09af53c9b6911bd16446850e75a8929 /cli
parent4d3b3d3f8a26b65e6a235d937baff40eefd577fd (diff)
cli : provide prompt for the nfs-ganesha disable cli
Presently, when we are executing the command "gluster nfs-ganesha disable", the disable of nfs-ganesha cluster starts working whereas, in some cases the user may not want to disable the cluster. So we shall let him know by giving a prompt to let him say "yes or no" for going ahead with the disable procedures. Change-Id: I860dad1479f7ca16bc2736b8056b609473bef65f BUG: 1289031 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/13450 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 08cdce4..04c7ae2 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -880,18 +880,23 @@ cli_cmd_ganesha_parse (struct cli_state *state,
goto out;
}
- question = "Enabling NFS-Ganesha requires Gluster-NFS to be"
- " disabled across the trusted pool. Do you "
- "still want to continue?\n";
-
if (strcmp (value, "enable") == 0) {
- answer = cli_cmd_get_confirmation (state, question);
- if (GF_ANSWER_NO == answer) {
- gf_log ("cli", GF_LOG_ERROR, "Global operation "
- "cancelled, exiting");
- ret = -1;
- goto out;
- }
+ question = "Enabling NFS-Ganesha requires Gluster-NFS to be"
+ " disabled across the trusted pool. Do you "
+ "still want to continue?\n";
+
+ } else if (strcmp (value, "disable") == 0) {
+ question = "Disabling NFS-Ganesha will tear down entire "
+ "ganesha cluster across the trusted pool. Do you "
+ "still want to continue?\n";
+ }
+
+ answer = cli_cmd_get_confirmation (state, question);
+ if (GF_ANSWER_NO == answer) {
+ gf_log ("cli", GF_LOG_ERROR, "Global operation "
+ "cancelled, exiting");
+ ret = -1;
+ goto out;
}
cli_out ("This will take a few minutes to complete. Please wait ..");