Add optional timeout parameter for backup rpc
[controller.git] / opendaylight / md-sal / sal-cluster-admin-api / src / main / yang / cluster-admin.yang
index 3acd0794e4280bf8c37ad0e7ed0367dcf5c08d78..260623f487f115e904fdccf3ba6d6c4414d5fad1 100644 (file)
@@ -10,6 +10,8 @@ module cluster-admin {
         description "Initial revision.";
     }
 
+    import odl-controller-cds-types { prefix cds; }
+
     typedef data-store-type {
         type enumeration {
             enum config {
@@ -230,6 +232,15 @@ module cluster-admin {
               type string;
               description "The path and name of the file in which to store the backup.";
             }
+
+            leaf timeout {
+              type uint32 {
+                range 1..max;
+              }
+              units "seconds";
+              description "Optional timeout in seconds for the backup operation which will override all the different
+                           timeouts that are being hit on the backend.";
+            }
         }
 
         description "Creates a backup file of the datastore state";
@@ -250,6 +261,32 @@ module cluster-admin {
         description "Returns the current role for the requested module shard.";
     }
 
+    rpc locate-shard {
+        description "Return the transport-level information about where a shard has a home.";
+        input {
+            uses datastore-shard-id;
+        }
+
+        output {
+            choice member-node {
+                description "Location of the hypothetical cluster member node. Relationship to the input parameters
+                             and the transport protocol.";
+
+                leaf local {
+                    description "Local node is the best node to talk to when it comes from efficiency perspective
+                                 of underlying implementation. The requester of this RPC is advised to contact
+                                 any services to the specified shard via the channel on which this RPC was invoked.";
+                    type empty;
+                }
+
+                leaf leader-actor-ref {
+                    description "Actor reference to the actor which is currently acting as the leader.";
+                    type string;
+                }
+            }
+        }
+    }
+
     rpc get-prefix-shard-role {
         input {
             leaf shard-prefix {
@@ -273,4 +310,22 @@ module cluster-admin {
 
         description "Returns the current role for the requested module shard.";
     }
+
+    rpc get-known-clients-for-all-shards {
+        description "Request all shards to report their known frontend clients. This is useful for determining what
+                     generation should a resurrected member node should use.";
+
+        output {
+            uses shard-result-output {
+                augment shard-result {
+                    list known-clients {
+                        when "../succeeded = true";
+
+                        uses cds:client-identifier;
+                        key "member type";
+                    }
+                }
+            }
+        }
+    }
 }