diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-09-10 16:07:29 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-10-07 22:41:22 -0700 |
commit | 4cf1e84ec80fc58f6f978165a81fd8acbcc648f8 (patch) | |
tree | 6024e0c4070c3530837e8dc78d0258ea5cf564bd /cli | |
parent | 303ae214dc533eb1fa6b9e834ee32f3b0d657a37 (diff) |
Tier/cli: Change detach-tier commit force to detach-tier force
Current detach-tier cli command support commit force.
Deprecating the same to force.
So the new syntax would be:
volume detach-tier <VOLNAME> <start|stop|status|commit|force>
Back port of>
>Change-Id: Ie86dfd72341078c0a1be94767f523730911312ef
>BUG: 1261862
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
>Reviewed-on: http://review.gluster.org/12151
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
>Reviewed-by: Dan Lambright <dlambrig@redhat.com>
>Tested-by: Dan Lambright <dlambrig@redhat.com>
(cherry picked from commit 68e8d617eb62a7ec40a1db5f3f60730767a168b6)
Change-Id: I5b72dd0046fcf2ead74f7d1275f35036cce3195b
BUG: 1258242
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/12246
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 19 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 2 |
2 files changed, 5 insertions, 16 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index cd63782e0f3..ffe945b0fac 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1782,21 +1782,11 @@ cli_cmd_volume_detach_tier_parse (const char **words, int wordcount, return -1; } - if (!((wordcount == 4) || (wordcount == 5))) { + if (wordcount != 4) { ret = -1; goto out; } - if (wordcount == 5) { - word = (char *)words[4]; - if (!strcmp(word, "force")) - force = 1; - else { - ret = -1; - goto out; - } - } - word = (char *)words[3]; ret = -1; @@ -1804,10 +1794,9 @@ cli_cmd_volume_detach_tier_parse (const char **words, int wordcount, if (!strcmp(word, "start")) { command = GF_OP_CMD_DETACH_START; } else if (!strcmp(word, "commit")) { - if (force) - command = GF_OP_CMD_DETACH_COMMIT_FORCE; - else - command = GF_OP_CMD_DETACH_COMMIT; + command = GF_OP_CMD_DETACH_COMMIT; + } else if (!strcmp(word, "force")) { + command = GF_OP_CMD_DETACH_COMMIT_FORCE; } else if (!strcmp(word, "stop")) command = GF_OP_CMD_STOP_DETACH_TIER; else if (!strcmp(word, "status")) diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 1b9f0af7833..4f71e21822a 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -2675,7 +2675,7 @@ struct cli_cmd volume_cmds[] = { "[<replica COUNT>] <NEW-BRICK>..."}, { "volume detach-tier <VOLNAME> " - " <start|stop|status|commit|[force]>", + " <start|stop|status|commit|force>", cli_cmd_volume_tier_cbk, "NOTE: this is old syntax, will be depreciated in next release. " "Please use gluster volume tier <vol> detach " |