diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2018-02-05 15:07:26 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2018-02-07 16:49:21 +0530 |
commit | 540e81676b1011dcf85fbe5cd6739a4f2143b2ab (patch) | |
tree | 7eed76faf5483e03bbbe59bb23ede3675ae6ad97 /utils/capabilities.h | |
parent | f217c0bf9cf464e21c01fa50643b778f236acedb (diff) |
replace: add replace feature
1. create conf in new node
2. delete conf from old node
3. replace portals from nodes hosting other paths (HA)
$ gluster-block create sample/block ha 3 192.168.124.57,192.168.124.26,192.168.124.30 1GiB --json-pretty
{
"IQN":"iqn.2016-12.org.gluster-block:d516bb5c-5f56-4d9c-96a7-385df19c2e2c",
"PORTAL(S)":[
"192.168.124.57:3260",
"192.168.124.26:3260",
"192.168.124.30:3260"
],
"RESULT":"SUCCESS"
}
$ gluster-block help
gluster-block (0.3)
usage:
gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
[...]
replace <volname/blockname> <old-node> <new-node> [force]
replace operations.
[...]
supported JSON formats:
--json|--json-plain|--json-spaced|--json-pretty
$ gluster-block replace sample/block 192.168.124.26 192.168.124.56 --json-pretty
{
"NAME":"block",
"CREATE SUCCESS":"192.168.124.56",
"DELETE SUCCESS":"192.168.124.26",
"REPLACE PORTAL SUCCESS ON":[
"192.168.124.57",
"192.168.124.30"
],
"RESULT":"SUCCESS"
}
Fixes: #4
Change-Id: I0411d15c407111db0d423052d9a6bc075174bf90
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'utils/capabilities.h')
-rw-r--r-- | utils/capabilities.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/capabilities.h b/utils/capabilities.h index b157d80..80f03bd 100644 --- a/utils/capabilities.h +++ b/utils/capabilities.h @@ -37,6 +37,8 @@ enum gbCapabilities { GB_MODIFY_CAP, GB_MODIFY_AUTH_CAP, + GB_REPLACE_CAP, + GB_JSON_CAP, GB_CAP_MAX @@ -55,6 +57,8 @@ static const char *const gbCapabilitiesLookup[] = { [GB_MODIFY_CAP] = "modify", [GB_MODIFY_AUTH_CAP] = "modify_auth", + [GB_REPLACE_CAP] = "replace", + [GB_JSON_CAP] = "json", [GB_CAP_MAX] = NULL |