summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-02-01 06:39:03 -0500
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-03-21 13:13:44 -0400
commit843e1b04b554ab887ec656ae7b468bb93ee4e2f7 (patch)
tree59f9b9fa44e0fbba2f6cf7076f7a7df45f58bdc8 /cli/src/cli-cmd-parser.c
parentf21fd308fcfab6151e7c8f60642d8dfcbec0cc48 (diff)
glusterd: (storhaug) remove ganesha
remove all vestiges of ganesha The storhaug CLI is used to manage ganesha and Samba. Also any setup and teardown of the ganesha HA is initiated using storhaug to preserve the proper layering. Change-Id: I0eec0016a1b7802a36e7b2d92896b86fdf8607d5 BUG: 1420713 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16504 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c106
1 files changed, 0 insertions, 106 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index e50d9f66f91..be53cd2ed40 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -818,112 +818,6 @@ out:
return ret;
}
-/* Parsing global option for NFS-Ganesha config
- * gluster nfs-ganesha enable/disable */
-
-int32_t
-cli_cmd_ganesha_parse (struct cli_state *state,
- const char **words, int wordcount,
- dict_t **options, char **op_errstr)
-{
- dict_t *dict = NULL;
- int ret = -1;
- char *key = NULL;
- char *value = NULL;
- char *w = NULL;
- char *opwords[] = { "enable", "disable", NULL };
- const char *question = NULL;
- gf_answer_t answer = GF_ANSWER_NO;
-
-
- GF_ASSERT (words);
- GF_ASSERT (options);
-
- dict = dict_new ();
-
- if (!dict)
- goto out;
-
- if (wordcount != 2)
- goto out;
-
- key = (char *) words[0];
- value = (char *) words[1];
-
- if (!key || !value) {
- cli_out ("Usage : nfs-ganesha <enable/disable>");
- ret = -1;
- goto out;
- }
-
- ret = gf_strip_whitespace (value, strlen (value));
- if (ret == -1)
- goto out;
-
- if (strcmp (key, "nfs-ganesha")) {
- gf_asprintf (op_errstr, "Global option: error: ' %s '"
- "is not a valid global option.", key);
- ret = -1;
- goto out;
- }
-
- w = str_getunamb (value, opwords);
- if (!w) {
- cli_out ("Invalid global option \n"
- "Usage : nfs-ganesha <enable/disable>");
- 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";
-
- 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;
- }
- }
- cli_out ("This will take a few minutes to complete. Please wait ..");
-
- ret = dict_set_str (dict, "key", key);
- if (ret) {
- gf_log (THIS->name, GF_LOG_ERROR, "dict set on key failed");
- goto out;
- }
-
- ret = dict_set_str (dict, "value", value);
- if (ret) {
- gf_log (THIS->name, GF_LOG_ERROR, "dict set on value failed");
- goto out;
- }
-
- ret = dict_set_str (dict, "globalname", "All");
- if (ret) {
- gf_log (THIS->name, GF_LOG_ERROR, "dict set on global"
- " key failed.");
- goto out;
- }
-
- ret = dict_set_int32 (dict, "hold_global_locks", _gf_true);
- if (ret) {
- gf_log (THIS->name, GF_LOG_ERROR, "dict set on global key "
- "failed.");
- goto out;
- }
-
- *options = dict;
-out:
- if (ret)
- dict_unref (dict);
-
- return ret;
-}
-
int32_t
cli_cmd_get_state_parse (struct cli_state *state,
const char **words, int wordcount,