summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-cmd-parser.c67
-rw-r--r--cli/src/cli-cmd-volume.c4
-rw-r--r--cli/src/cli3_1-cops.c5
3 files changed, 4 insertions, 72 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 3780abefe..826717223 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -435,9 +435,6 @@ cli_cmd_volume_add_brick_parse (const char **words, int wordcount,
char *volname = NULL;
char *delimiter = NULL;
int ret = -1;
- gf1_cluster_type type = GF_CLUSTER_TYPE_NONE;
- int count = 0;
- //char key[50] = {0,};
int brick_count = 0, brick_index = 0;
int brick_list_size = 1;
char brick_list[120000] = {0,};
@@ -477,36 +474,7 @@ cli_cmd_volume_add_brick_parse (const char **words, int wordcount,
goto out;
}
- if ((strcasecmp (words[3], "replica")) == 0) {
- type = GF_CLUSTER_TYPE_REPLICATE;
- if (wordcount < 5) {
- ret = -1;
- goto out;
- }
-
- errno = 0;
- count = strtol (words[4], NULL, 0);
- if (errno == ERANGE && (count == LONG_MAX || count == LONG_MIN))
- goto out;
-
- brick_index = 5;
- } else if ((strcasecmp (words[3], "stripe")) == 0) {
- type = GF_CLUSTER_TYPE_STRIPE;
- if (wordcount < 5) {
- ret = -1;
- goto out;
- }
-
- errno = 0;
- count = strtol (words[4], NULL, 0);
- if (errno == ERANGE && (count == LONG_MAX || count == LONG_MIN))
- goto out;
-
- brick_index = 5;
- } else {
- brick_index = 3;
- }
-
+ brick_index = 3;
strcpy (brick_list, " ");
while (brick_index < wordcount) {
delimiter = strchr (words[brick_index], ':');
@@ -610,8 +578,6 @@ cli_cmd_volume_remove_brick_parse (const char **words, int wordcount,
char *volname = NULL;
char *delimiter = NULL;
int ret = -1;
- gf1_cluster_type type = GF_CLUSTER_TYPE_NONE;
- int count = 0;
char key[50];
int brick_count = 0, brick_index = 0;
int32_t tmp_index = 0;
@@ -647,36 +613,7 @@ cli_cmd_volume_remove_brick_parse (const char **words, int wordcount,
goto out;
}
- if ((strcasecmp (words[3], "replica")) == 0) {
- type = GF_CLUSTER_TYPE_REPLICATE;
- if (wordcount < 5) {
- ret = -1;
- goto out;
- }
- errno = 0;
- count = strtol (words[4], NULL, 0);
- if (errno == ERANGE && (count == LONG_MAX || count == LONG_MIN))
- goto out;
-
- brick_index = 5;
- } else if ((strcasecmp (words[3], "stripe")) == 0) {
- type = GF_CLUSTER_TYPE_STRIPE;
- if (wordcount < 5) {
- ret = -1;
- goto out;
- }
-
- errno = 0;
- count = strtol (words[4], NULL, 0);
- if (errno == ERANGE && (count == LONG_MAX || count == LONG_MIN))
- goto out;
-
- brick_index = 5;
- } else {
- brick_index = 3;
- }
-
- ret = dict_set_int32 (dict, "type", type);
+ brick_index = 3;
if (ret)
goto out;
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index c2b819e68..7a2109539 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -910,11 +910,11 @@ struct cli_cmd volume_cmds[] = {
cli_cmd_volume_rename_cbk,
"rename volume <VOLNAME> to <NEW-VOLNAME>"},*/
- { "volume add-brick <VOLNAME> [(replica <COUNT>)|(stripe <COUNT>)] <NEW-BRICK> ...",
+ { "volume add-brick <VOLNAME> <NEW-BRICK> ...",
cli_cmd_volume_add_brick_cbk,
"add brick to volume <VOLNAME>"},
- { "volume remove-brick <VOLNAME> [(replica <COUNT>)|(stripe <COUNT>)] <BRICK> ...",
+ { "volume remove-brick <VOLNAME> <BRICK> ...",
cli_cmd_volume_remove_brick_cbk,
"remove brick from volume <VOLNAME>"},
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index b2adb0188..dec20d904 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -1946,11 +1946,6 @@ gf_cli3_1_remove_brick (call_frame_t *frame, xlator_t *this,
if (ret)
goto out;
- ret = dict_get_int32 (dict, "type", (int32_t *)&req.type);
-
- if (ret)
- goto out;
-
ret = dict_get_int32 (dict, "count", &req.count);
if (ret)