3 namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:cluster:admin";
4 prefix "cluster-admin";
7 "This module contains YANG RPC definitions for administering a cluster.";
9 revision "2015-10-13" {
10 description "Initial revision.";
13 typedef data-store-type {
24 grouping shard-operation-result {
29 leaf data-store-type {
42 rpc add-shard-replica {
46 description "The name of the shard for which to create a replica.";
49 leaf data-store-type {
51 description "The type of the data store to which the replica belongs";
55 description "Adds a replica of a shard to this node and joins it to an existing cluster. The shard must
56 already have a module configuration defined for it and there must already be a shard existing on
57 another node with a leader. This RPC first contacts peer member seed nodes searching for a shard.
58 When found, an AddServer message is sent to the shard leader and applied as described in the Raft
62 rpc remove-shard-replica {
66 description "The name of the shard for which to remove the replica.";
71 description "The cluster member from which the shard replica should be removed";
74 leaf data-store-type {
76 description "The type of the data store to which the replica belongs";
80 description "Removes an existing replica of a shard from this node via the RemoveServer mechanism as
81 described in the Raft paper.";
84 rpc add-replicas-for-all-shards {
87 key "shard-name data-store-type";
88 uses shard-operation-result;
90 description "The list of results, one per shard";
94 description "Adds replicas on this node for all currently defined shards. This is equivalent to issuing
95 an add-shard-replica RPC for all shards.";
98 rpc remove-all-shard-replicas {
99 description "Removes replicas for all shards on this node. This is equivalent to issuing
100 a remove-shard-replica for all shards and essentially removes this node from a cluster.";
103 rpc convert-members-to-nonvoting-for-all-shards {
105 leaf-list member-names {
107 description "The names of the cluster members to convert.";
111 description "Converts the given cluster members to non-voting for all shards. The members will no
112 longer participate in leader elections and consensus but will be replicated. This is useful for
113 having a set of members serve as a backup cluster in case the primary voting cluster suffers
114 catastrophic failure. This RPC can be issued to any cluster member and will be forwarded
118 rpc convert-members-to-voting-for-all-shards {
120 leaf-list member-names {
122 description "The names of the cluster members to convert.";
126 description "Converts the given cluster members to voting for all shards. The members will
127 participate in leader elections and consensus.";
130 rpc backup-datastore {
134 description "The path and name of the file in which to store the backup.";
138 description "Creates a backup file of the datastore state";