Bug 7806 - Implement agent RPCs for shard replica manipulation testing
[controller.git] / opendaylight / md-sal / sal-cluster-admin-api / src / main / yang / cluster-admin.yang
index 40fb5fbe7118fc18dd7a5c03889fbc31ca48c45f..8a3c58a16279f25d7e4a8d2375ea52c898ef4e40 100644 (file)
@@ -109,6 +109,49 @@ module cluster-admin {
             described in the Raft paper.";
     }
 
+    rpc add-prefix-shard-replica {
+        input {
+            leaf shard-prefix {
+                mandatory true;
+                type instance-identifier;
+            }
+
+            leaf data-store-type {
+                mandatory true;
+                type data-store-type;
+                description "The type of the data store to which the replica belongs";
+            }
+        }
+
+        description "Adds a replica of a shard to this node and joins it to an existing cluster. There must already be
+                    a shard existing on another node with a leader. This RPC first contacts peer member seed nodes
+                    searching for a shard. When found, an AddServer message is sent to the shard leader and applied as
+                    described in the Raft paper.";
+    }
+
+    rpc remove-prefix-shard-replica {
+        input {
+            leaf shard-prefix {
+                mandatory true;
+                type instance-identifier;
+            }
+            leaf member-name {
+                mandatory true;
+                type string;
+                description "The cluster member from which the shard replica should be removed";
+            }
+
+            leaf data-store-type {
+                mandatory true;
+                type data-store-type;
+                description "The type of the data store to which the replica belongs";
+            }
+        }
+
+        description "Removes an existing replica of a prefix shard from this node via the RemoveServer mechanism as
+                    described in the Raft paper.";
+    }
+
     rpc add-replicas-for-all-shards {
         output {
             uses shard-result-output;