add delete_node API
Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/38eaa88e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/38eaa88e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/38eaa88e Branch: refs/heads/master Commit: 38eaa88e6223c518aca1ed90154c59462974e1ea Parents: ecf310a Author: Jan Lehnardt <[email protected]> Authored: Fri Oct 31 17:36:21 2014 +0100 Committer: Jan Lehnardt <[email protected]> Committed: Fri Oct 31 17:36:21 2014 +0100 ---------------------------------------------------------------------- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/38eaa88e/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 715d987..f4e84c8 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ UI shows an âAdd Nodeâ interface with the fields admin, and node: - POST to /_setup with { "action": "add_node", - "admin": { // should be auto-filled from Fauxton + "admin": { // should be auto-filled from Fauxton, store plaintext PW in + // localStorage until we finish_cluster or timeout. "user": "username", "pass": "password" }, @@ -135,6 +136,8 @@ POST /_setup {"action":"add_node"...} -> Stay in State 2, but return "nodes":["n POST /_setup {"action":"add_node"...} -> if target node not available, Error POST /_setup {"action":"finish_cluster"} with no nodes set up -> Error POST /_setup {"action":"finish_cluster"} -> Transition to State 3 +POST /_setup {"action":"delete_node"...} -> Stay in State 2, but delete node from /nodes, reflect the change in GET /_setup +POST /_setup {"action":"delete_node","node":"unknown"} -> Error Unknown Node ### State 3: Cluster set up, all nodes operational @@ -146,5 +149,7 @@ POST /_setup {"action":"enable_cluster"...} -> Error POST /_setup {"action":"finish_cluster"...} -> Stay in State 3, do nothing POST /_setup {"action":"add_node"...} -> Error POST /_setup?i_know_what_i_am_doing=true {"action":"add_node"...} -> Add node, stay in State 3. +POST /_setup {"action":"delete_node"...} -> Stay in State 3, but delete node from /nodes, reflect the change in GET /_setup +POST /_setup {"action":"delete_node","node":"unknown"} -> Error Unknown Node -// TBD: we need to persist the setup state somewhere. \ No newline at end of file +// TBD: we need to persist the setup state somewhere.
