BUG-8494: Cleanup clustering-it-provider
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / model / src / main / yang / odl-mdsal-lowlevel-control.yang
index a10b3ce628154943f0a98d9f8adc396e3ff29ebe..aa2f2da7dd0fdb9746328321aaf921594786f349 100644 (file)
@@ -227,6 +227,37 @@ module odl-mdsal-lowlevel-control {
         }
     }
 
+    grouping transactions-params {
+        leaf seconds {
+            description "This RPC has to work (roughly) this long.";
+            mandatory true;
+            type uint32;
+        }
+        leaf transactions-per-second {
+            description "An upper limit of transactions per second this RPC shall try to achieve.";
+            mandatory true;
+            type uint32;
+        }
+    }
+
+    grouping transactions-result {
+        leaf all-tx {
+            description "Number of all transactions executed.";
+            type int64;
+            mandatory true;
+        }
+        leaf insert-tx {
+            description "Number of transactions that inserted data.";
+            type int64;
+            mandatory true;
+        }
+        leaf delete-tx {
+            description "Number of transactions that deleted data.";
+            type int64;
+            mandatory true;
+        }
+    }
+
     rpc write-transactions {
         description "Upon receiving this, the member shall make sure the outer list item
             of llt:id-ints exists for the given id, and then start creating (one by one)
@@ -245,16 +276,7 @@ module odl-mdsal-lowlevel-control {
             OptimisticLockException is always considered an error.";
         input {
             uses llc:id-grouping;
-            leaf seconds {
-                description "This RPC has to work (roughly) this long.";
-                mandatory true;
-                type uint32;
-            }
-            leaf transactions-per-second {
-                description "An upper limit of transactions per second this RPC shall try to achieve.";
-                mandatory true;
-                type uint32;
-            }
+            uses transactions-params;
             leaf chained-transactions {
                 description "If true, write transactions shall be created on a transaction chain,
                     (created at start of the RPC call, and deleted at at its end).
@@ -264,21 +286,7 @@ module odl-mdsal-lowlevel-control {
             }
         }
         output {
-            leaf all-tx {
-                description "Number of all transactions executed.";
-                type int64;
-                mandatory true;
-            }
-            leaf insert-tx {
-                description "Number of transactions that inserted data.";
-                type int64;
-                mandatory true;
-            }
-            leaf delete-tx {
-                description "Number of transactions that deleted data.";
-                type int64;
-                mandatory true;
-            }
+            uses transactions-result;
         }
     }
 
@@ -305,16 +313,7 @@ module odl-mdsal-lowlevel-control {
             but the shard and the whole id item shall be kept as they are.";
         input {
             uses llc:id-grouping;
-            leaf seconds {
-                description "This RPC has to work (roughly) this long.";
-                mandatory true;
-                type uint32;
-            }
-            leaf transactions-per-second {
-                description "An upper limit of transactions per second this RPC shall try to achieve.";
-                mandatory true;
-                type uint32;
-            }
+            uses transactions-params;
             leaf isolated-transactions {
                 description "The value for DOMDataTreeProducer#createTransaction argument.";
                 mandatory true;
@@ -322,21 +321,7 @@ module odl-mdsal-lowlevel-control {
             }
         }
         output {
-            leaf all-tx {
-                description "Number of all transactions executed.";
-                type int64;
-                mandatory true;
-            }
-            leaf insert-tx {
-                description "Number of transactions that inserted data.";
-                type int64;
-                mandatory true;
-            }
-            leaf delete-tx {
-                description "Number of transactions that deleted data.";
-                type int64;
-                mandatory true;
-            }
+            uses transactions-result;
         }
     }
 
@@ -374,12 +359,9 @@ module odl-mdsal-lowlevel-control {
             to become Leader of the given shard (presumably the llt:list-ints one,
             created by produce-transactions) and return immediatelly.";
         input {
-            leaf shard-name {
-                description "TBD.
-
-                FIXME: Ask Java implementation developer about the format needed.";
+            leaf prefix {
                 mandatory true;
-                type string;
+                type instance-identifier;
             }
         }
         // No output.
@@ -433,12 +415,10 @@ module odl-mdsal-lowlevel-control {
     rpc subscribe-dtcl {
         description "Upon receiving this, the member checks whether it has already subscribed
             and fails if yes. If no, the member subscribes a Data Tree Change Listener
-            to listen for changes on whole llt:id-ints, and stores the state
-            from the initial notification to a local variable (called the local copy).
-            Each Data Tree Change from further Notifications shall be applied
-            to the local copy if it is compatible
-            (the old state from notification is equal to the local copy state).
-            If a notification is not compatible, it shall be ignored.";
+            to listen for changes on whole llt:id-ints. The first notification received is stored immediately.
+            Every notification received after the first one has the data(getDataBefore()) compared with the
+            last stored notification(called local copy), if they match the local copy is overwritten with
+            this notifications data(getDataAfter()). If they don't match the new notification is ignored.";
         // No input.
         // No output.
     }
@@ -518,4 +498,28 @@ module odl-mdsal-lowlevel-control {
         // No output.
     }
 
+    rpc shutdown-shard-replica {
+        description "Upon receiving this, the member will try to gracefully shutdown local configuration
+            data store module-based shard replica.";
+        input {
+            leaf shard-name {
+                type string;
+                description "The name of the configuration data store module-based shard to be shutdown
+                    gracefully.";
+            }
+        }
+    }
+
+    rpc shutdown-prefix-shard-replica {
+        description "Upon receiving this, the member will try to gracefully shutdown local configuration
+            data store prefix-based shard replica.";
+        input {
+            leaf prefix {
+                description "The prefix of the configuration data store prefix-based shard to be shutdown
+                    gracefully.";
+                mandatory true;
+                type instance-identifier;
+            }
+        }
+    }
 }