05d5b3e18643e5c19155d343cd0013e547eb90eb
[controller.git] / opendaylight / md-sal / sal-dom-broker-config / src / main / yang / opendaylight-dom-broker-impl.yang
1 module opendaylight-sal-dom-broker-impl {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl";
4     prefix "broker";
5
6     import config { prefix config; revision-date 2013-04-05; }
7     import ietf-yang-types { prefix yang; }
8     import opendaylight-md-sal-dom {prefix sal;}
9     import opendaylight-md-sal-common {prefix common;}
10     import opendaylight-config-dom-datastore {prefix config-dom-store-spi;}
11     import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;}
12     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
13
14     description
15         "Service definition for Binding Aware MD-SAL.
16         Note: The dom-inmemory-data-broker utilizes configurable config-dom-datastore
17         and operation-dom-datastore. If configuration is not done for this stores
18         then it defaults to InMemoryDOMDataStore";
19
20     revision "2013-10-28" {
21         description
22             "Initial revision";
23     }
24
25     identity dom-broker-impl {
26         base config:module-type;
27         config:provided-service sal:dom-broker-osgi-registry;
28         config:java-name-prefix DomBrokerImpl;
29     }
30
31
32     identity dom-inmemory-data-broker {
33         base config:module-type;
34         config:provided-service sal:dom-async-data-broker;
35     }
36
37     identity schema-service-singleton {
38         base config:module-type;
39         config:provided-service sal:schema-service;
40         config:provided-service sal:yang-text-source-provider;
41         config:java-name-prefix SchemaServiceImplSingleton;
42     }
43
44     typedef max-queue-depth {
45         type uint32 {
46             range 1..1073741824;
47         }
48     }
49
50     augment "/config:modules/config:module/config:configuration" {
51         case dom-broker-impl {
52             when "/config:modules/config:module/config:type = 'dom-broker-impl'";
53
54             container async-data-broker {
55                 uses config:service-ref {
56                     refine type {
57                         mandatory false;
58                         config:required-identity sal:dom-async-data-broker;
59                     }
60                 }
61             }
62
63             container root-schema-service {
64                 uses config:service-ref {
65                     refine type {
66                         mandatory false;
67                         config:required-identity sal:schema-service;
68                     }
69                 }
70             }
71
72             leaf notification-queue-depth {
73                 description "Maximum number of elements in the notification queue, must be power-of-two.";
74                 type max-queue-depth;
75                 default 65536;
76             }
77             leaf notification-queue-spin {
78                 description "Number of milliseconds notification queue should spin for new requests before parking.";
79                 type uint16;
80                 units milliseconds;
81                 default 1;
82             }
83             leaf notification-queue-park {
84                 description "Number of milliseconds notification queue should park for new requests before blocking.";
85                 type uint16;
86                 units milliseconds;
87                 default 30;
88             }
89         }
90     }
91
92     grouping dom-broker-config {
93         container schema-service {
94             uses config:service-ref {
95                 refine type {
96                     mandatory false;
97                     config:required-identity sal:schema-service;
98                 }
99             }
100         }
101
102         container config-data-store {
103              uses config:service-ref {
104                  refine type {
105                      mandatory false;
106                      config:required-identity config-dom-store-spi:config-dom-datastore;
107                  }
108              }
109         }
110
111         container operational-data-store {
112               uses config:service-ref {
113                    refine type {
114                        mandatory false;
115                        config:required-identity operational-dom-store-spi:operational-dom-datastore;
116                    }
117                }
118         }
119
120         leaf max-data-broker-future-callback-queue-size {
121             default 1000;
122             type uint16;
123             description "The maximum queue size for the data broker's commit future callback executor.";
124         }
125
126         leaf max-data-broker-future-callback-pool-size {
127             default 20;
128             type uint16;
129             description "The maximum thread pool size for the data broker's commit future callback executor.";
130         }
131
132         leaf max-data-broker-commit-queue-size {
133             default 5000;
134             type uint16;
135             description "The maximum queue size for the data broker's commit executor.";
136         }
137     }
138
139     grouping dom-broker-operational {
140         leaf total-commits {
141             type uint64;
142         }
143
144         leaf average-commit {
145             type uint64;
146             units ns;
147         }
148
149         leaf longest-commit-duration {
150             type uint64;
151             units ns;
152         }
153
154         leaf longest-commit-timestamp {
155             type yang:date-and-time;
156         }
157
158         leaf shortest-commit-duration {
159             type uint64;
160             units ns;
161         }
162
163         leaf shortest-commit-timestamp {
164             type yang:date-and-time;
165         }
166
167         rpcx:rpc-context-instance dom-broker-rpc-ctx;
168     }
169
170     identity dom-broker-rpc-ctx;
171
172     rpc reset-statistics {
173         description
174           "JMX call to clear the toasts-made counter.";
175
176         input {
177             uses rpcx:rpc-context-ref {
178                 refine context-instance {
179                     rpcx:rpc-context-instance dom-broker-rpc-ctx;
180                 }
181             }
182         }
183     }
184
185     augment "/config:modules/config:module/config:configuration" {
186         case dom-inmemory-data-broker {
187             when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'";
188
189             uses dom-broker-config;
190         }
191     }
192
193     augment "/config:modules/config:module/config:state" {
194         case dom-inmemory-data-broker {
195             when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'";
196
197             uses dom-broker-operational;
198         }
199     }
200
201     augment "/config:modules/config:module/config:state" {
202         case schema-service-singleton {
203             when "/config:modules/config:module/config:type = 'schema-service-singleton'";
204         }
205     }
206
207     augment "/config:modules/config:module/config:state" {
208         case dom-broker-impl {
209             when "/config:modules/config:module/config:type = 'dom-broker-impl'";
210             container data {
211                 uses common:data-state;
212             }
213         }
214     }
215 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.