Bug 4564: Implement GetSnapshot message in ShardManager
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / yang / cluster-admin.yang
1 module cluster-admin {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:cluster:admin";
4     prefix "cluster-admin";
5
6     description
7         "This module contains YANG RPC definitions for administering a cluster.";
8
9     revision "2015-10-13" {
10         description "Initial revision.";
11     }
12
13     rpc add-shard-replica {
14         input {
15             leaf shard-name {
16               type string;
17               description "The name of the shard for which to create a replica.";
18             }
19         }
20
21         description "Adds a replica of a shard to this node and joins it to an existing cluster. The shard must
22             already have a module configuration defined for it and there must already be a shard existing on
23             another node with a leader. This RPC first contacts peer member seed nodes searching for a shard.
24             When found, an AddServer message is sent to the shard leader and applied as described in the Raft
25             paper.";
26     }
27
28     rpc remove-shard-replica {
29         input {
30             leaf shard-name {
31               type string;
32               description "The name of the shard for which to remove the replica.";
33             }
34         }
35
36         description "Removes an existing replica of a shard from this node via the RemoveServer mechanism as
37             described in the Raft paper.";
38     }
39
40     rpc add-replicas-for-all-shards {
41         description "Adds replicas on this node for all currently defined shards. This is equivalent to issuing
42             an add-shard-replica RPC for all shards.";
43     }
44
45     rpc remove-all-shard-replicas {
46         description "Removes replicas for all shards on this node. This is equivalent to issuing
47             a remove-shard-replica for all shards and essentially removes this node from a cluster.";
48     }
49
50     rpc convert-members-to-nonvoting-for-all-shards {
51         input {
52             leaf-list member-names {
53                 type string;
54                 description "The names of the cluster members to convert.";
55             }
56         }
57         
58         description "Converts the given cluster members to non-voting for all shards. The members will no 
59             longer participate in leader elections and consensus but will be replicated. This is useful for
60             having a set of members serve as a backup cluster in case the primary voting cluster suffers
61             catastrophic failure. This RPC can be issued to any cluster member and will be forwarded
62             to the leader.";
63     }
64
65     rpc convert-members-to-voting-for-all-shards {
66         input {
67             leaf-list member-names {
68                 type string;
69                 description "The names of the cluster members to convert.";
70             }
71         }
72
73         description "Converts the given cluster members to voting for all shards. The members will 
74             participate in leader elections and consensus.";
75     }
76
77     rpc backup-datastore {
78         input {
79             leaf file-path {
80               type string;
81               description "The path and name of the file in which to store the backup.";
82             }
83         }
84
85         description "Creates a backup file of the datastore state";
86     }
87 }