Default shard-journal-recovery-log-batch-size to 1
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / yang / cluster-admin.yang
index 967e5554dfaa0e96a1bde2c9277c0d8883c9fc40..2d81db7117421ded2c4b5d662a74570c33063773 100644 (file)
@@ -12,20 +12,54 @@ module cluster-admin {
 
     typedef data-store-type {
         type enumeration {
-          enum config {
-            value 1;
-          }
-          enum operational {
-            value 2;
-          }
+            enum config {
+                value 1;
+            }
+            enum operational {
+                value 2;
+            }
         }
     }
 
+    grouping shard-operation-result {
+        leaf shard-name {
+            type string;
+        }
+
+        leaf data-store-type {
+            type data-store-type;
+        }
+
+        leaf succeeded {
+            type boolean;
+        }
+
+        leaf error-message {
+            type string;
+        }
+    }
+
+    grouping shard-result-output {
+        list shard-result {
+            key "shard-name data-store-type";
+            uses shard-operation-result;
+
+            description "The list of results, one per shard";
+        }
+    }
+    
     rpc add-shard-replica {
         input {
             leaf shard-name {
-              type string;
-              description "The name of the shard for which to create a replica.";
+                mandatory true;
+                type string;
+                description "The name of the shard for which to create a replica.";
+            }
+
+            leaf data-store-type {
+                mandatory true;
+                type data-store-type;
+                description "The type of the data store to which the replica belongs";
             }
         }
 
@@ -39,18 +73,21 @@ module cluster-admin {
     rpc remove-shard-replica {
         input {
             leaf shard-name {
-              type string;
-              description "The name of the shard for which to remove the replica.";
+                mandatory true;
+                type string;
+                description "The name of the shard for which to remove the replica.";
             }
 
             leaf member-name {
-              type string;
-              description "The cluster member from which the shard replica should be removed";
+                mandatory true;
+                type string;
+                description "The cluster member from which the shard replica should be removed";
             }
 
             leaf data-store-type {
-              type data-store-type;
-              description "The type of the data store to which the replica belongs";
+                mandatory true;
+                type data-store-type;
+                description "The type of the data store to which the replica belongs";
             }
         }
 
@@ -59,11 +96,27 @@ module cluster-admin {
     }
 
     rpc add-replicas-for-all-shards {
+        output {
+            uses shard-result-output;
+        }
+
         description "Adds replicas on this node for all currently defined shards. This is equivalent to issuing
             an add-shard-replica RPC for all shards.";
     }
 
     rpc remove-all-shard-replicas {
+        input {
+            leaf member-name {
+                mandatory true;
+                type string;
+                description "The cluster member from which the shard replicas should be removed";
+            }
+        }
+        
+        output {
+            uses shard-result-output;
+        }
+        
         description "Removes replicas for all shards on this node. This is equivalent to issuing
             a remove-shard-replica for all shards and essentially removes this node from a cluster.";
     }