Model dom-broker statistics
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / yang / opendaylight-dom-broker-impl.yang
index a0ee5c50c93bc8a576c2d71b2dd7b37b86cda896..989b5b56499c075db324187cb3024be43b5b7f53 100644 (file)
@@ -1,20 +1,22 @@
 module opendaylight-sal-dom-broker-impl {
-       yang-version 1;
+    yang-version 1;
     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl";
-    prefix "binding-impl";
+    prefix "broker";
 
-       import config { prefix config; revision-date 2013-04-05; }
-       import opendaylight-md-sal-dom {prefix sal;}
-       import opendaylight-md-sal-common {prefix common;}
-       import opendaylight-config-dom-datastore {prefix config-dom-store-spi;}
-       import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;}
+    import config { prefix config; revision-date 2013-04-05; }
+    import ietf-yang-types { prefix yang; }
+    import opendaylight-md-sal-dom {prefix sal;}
+    import opendaylight-md-sal-common {prefix common;}
+    import opendaylight-config-dom-datastore {prefix config-dom-store-spi;}
+    import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;}
+    import rpc-context { prefix rpcx; revision-date 2013-06-17; }
 
     description
         "Service definition for Binding Aware MD-SAL.
         Note: The dom-inmemory-data-broker utilizes configurable config-dom-datastore
         and operation-dom-datastore. If configuration is not done for this stores
         then it defaults to InMemoryDOMDataStore";
+
     revision "2013-10-28" {
         description
             "Initial revision";
@@ -24,20 +26,14 @@ module opendaylight-sal-dom-broker-impl {
         base config:module-type;
         config:provided-service sal:dom-broker-osgi-registry;
         config:java-name-prefix DomBrokerImpl;
-    }    
-    
-    
+    }
+
+
     identity dom-inmemory-data-broker {
         base config:module-type;
         config:provided-service sal:dom-async-data-broker;
     }
-    
-    identity hash-map-data-store {
-        base config:module-type;
-        config:provided-service sal:dom-data-store;
-        config:java-name-prefix HashMapDataStore;
-    }
-    
+
     identity schema-service-singleton {
         base config:module-type;
         config:provided-service sal:schema-service;
@@ -75,60 +71,128 @@ module opendaylight-sal-dom-broker-impl {
             }
         }
     }
-    
-    augment "/config:modules/config:module/config:configuration" {
-        case dom-inmemory-data-broker {
-            when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'";
 
-
-            container schema-service {
-                uses config:service-ref {
-                    refine type {
-                        mandatory false;
-                        config:required-identity sal:schema-service;
-                    }
+    grouping dom-broker-config {
+        container schema-service {
+            uses config:service-ref {
+                refine type {
+                    mandatory false;
+                    config:required-identity sal:schema-service;
                 }
-
             }
+        }
 
-            container config-data-store{
-                 uses config:service-ref {
-                     refine type {
-                         mandatory false;
-                         config:required-identity  config-dom-store-spi:config-dom-datastore;
-                     }
+        container config-data-store {
+             uses config:service-ref {
+                 refine type {
+                     mandatory false;
+                     config:required-identity config-dom-store-spi:config-dom-datastore;
                  }
-            }
+             }
+        }
 
-            container operational-data-store{
-                  uses config:service-ref {
-                       refine type {
-                           mandatory false;
-                           config:required-identity operational-dom-store-spi:operational-dom-datastore;
-                       }
+        container operational-data-store {
+              uses config:service-ref {
+                   refine type {
+                       mandatory false;
+                       config:required-identity operational-dom-store-spi:operational-dom-datastore;
                    }
+               }
+        }
+
+        leaf max-data-broker-future-callback-queue-size {
+            default 1000;
+            type uint16;
+            description "The maximum queue size for the data broker's commit future callback executor.";
+        }
+
+        leaf max-data-broker-future-callback-pool-size {
+            default 20;
+            type uint16;
+            description "The maximum thread pool size for the data broker's commit future callback executor.";
+        }
+
+        leaf max-data-broker-commit-queue-size {
+            default 5000;
+            type uint16;
+            description "The maximum queue size for the data broker's commit executor.";
+        }
+    }
+
+    grouping dom-broker-operational {
+        leaf total-commits {
+            type uint64;
+        }
+
+        leaf average-commit {
+            type uint64;
+            units ns;
+        }
+
+        leaf longest-commit-duration {
+            type uint64;
+            units ns;
+        }
+
+        leaf longest-commit-timestamp {
+            type yang:date-and-time;
+        }
+
+        leaf shortest-commit-duration {
+            type uint64;
+            units ns;
+        }
+
+        leaf shortest-commit-timestamp {
+            type yang:date-and-time;
+        }
+
+        rpcx:rpc-context-instance dom-broker-rpc-ctx;
+    }
+
+    identity dom-broker-rpc-ctx;
+
+    rpc reset-statistics {
+        description
+          "JMX call to clear the toasts-made counter.";
+
+        input {
+            uses rpcx:rpc-context-ref {
+                refine context-instance {
+                    rpcx:rpc-context-instance dom-broker-rpc-ctx;
+                }
             }
         }
     }
-    
+
+    augment "/config:modules/config:module/config:configuration" {
+        case dom-inmemory-data-broker {
+            when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'";
+
+            uses dom-broker-config;
+        }
+    }
+
     augment "/config:modules/config:module/config:state" {
-        case hash-map-data-store {
-            when "/config:modules/config:module/config:type = 'hash-map-data-store'";
+        case dom-inmemory-data-broker {
+            when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'";
+
+            uses dom-broker-operational;
         }
     }
-    
+
     augment "/config:modules/config:module/config:state" {
         case schema-service-singleton {
             when "/config:modules/config:module/config:type = 'schema-service-singleton'";
         }
     }
-    
+
     augment "/config:modules/config:module/config:state" {
         case dom-broker-impl {
             when "/config:modules/config:module/config:type = 'dom-broker-impl'";
             container data {
                 uses common:data-state;
-            } 
+            }
         }
     }
-}
\ No newline at end of file
+}