summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-03-24 18:20:42 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-25 04:58:59 -0700
commit1579d633dbeeeede20d016bbec806a00688e32f3 (patch)
tree674c4927f0c0b3ccd0578d5573a29d05a3b7a4bc /cli
parent91708968d01b253ee1ebcec1fdc3d602435144ef (diff)
glusterd: bitrot scrub-throttle/scrub-frequency/scrub option handling
CLI commands for bitrot features: volume bitrot <volname> {scrub-throttle frozen|lazy|normal|aggressive} volume bitrot <volname> {scrub-frequency daily|weekly|biweekly|monthly} volume bitrot <volname> {scrub pause|resume} These commands will handle their options and set respective value in dictionary. Change-Id: I1e8aa1b1c7d91a7f0faec9a2968b3072f42f8ba8 BUG: 1170075 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/9985 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 0584b1edbbd..1c2e14c7a5e 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -4859,12 +4859,14 @@ cli_cmd_bitrot_parse (const char **words, int wordcount, dict_t **options)
char *opwords[] = {"enable", "disable",
"scrub-throttle",
"scrub-frequency",
- "scrub"};
+ "scrub", NULL};
char *scrub_throt_values[] = {"frozen", "lazy", "normal",
- "aggressive"};
+ "aggressive", NULL};
char *scrub_freq_values[] = {"daily", "weekly",
- "biweekly", "monthly"};
- char *scrub_values[] = {"pause", "resume"};
+ "biweekly", "monthly",
+ NULL};
+ char *scrub_values[] = {"pause", "resume",
+ NULL};
dict_t *dict = NULL;
gf_bitrot_type type = GF_BITROT_OPTION_TYPE_NONE;