Merge "Fix checkstyle warnings"
[controller.git] / opendaylight / md-sal / sal-dom-broker / 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 "binding-impl";
5
6         import config { prefix config; revision-date 2013-04-05; }
7         import opendaylight-md-sal-dom {prefix sal;}
8         import opendaylight-md-sal-common {prefix common;}
9         import opendaylight-config-dom-datastore {prefix config-dom-store-spi;}
10         import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;}
11
12     description
13         "Service definition for Binding Aware MD-SAL.
14         Note: The dom-inmemory-data-broker utilizes configurable config-dom-datastore
15         and operation-dom-datastore. If configuration is not done for this stores
16         then it defaults to InMemoryDOMDataStore";
17  
18     revision "2013-10-28" {
19         description
20             "Initial revision";
21     }
22
23     identity dom-broker-impl {
24         base config:module-type;
25         config:provided-service sal:dom-broker-osgi-registry;
26         config:java-name-prefix DomBrokerImpl;
27     }    
28     
29     
30     identity dom-inmemory-data-broker {
31         base config:module-type;
32         config:provided-service sal:dom-async-data-broker;
33     }
34     
35     identity schema-service-singleton {
36         base config:module-type;
37         config:provided-service sal:schema-service;
38         config:java-name-prefix SchemaServiceImplSingleton;
39     }
40
41     augment "/config:modules/config:module/config:configuration" {
42         case dom-broker-impl {
43             when "/config:modules/config:module/config:type = 'dom-broker-impl'";
44             container data-store {
45                 uses config:service-ref {
46                     refine type {
47                         mandatory false;
48                         config:required-identity sal:dom-data-store;
49                     }
50                 }
51             }
52
53             container async-data-broker {
54                 uses config:service-ref {
55                     refine type {
56                         mandatory false;
57                         config:required-identity sal:dom-async-data-broker;
58                     }
59                 }
60             }
61
62             container root-schema-service {
63                 uses config:service-ref {
64                     refine type {
65                         mandatory false;
66                         config:required-identity sal:schema-service;
67                     }
68                 }
69             }
70         }
71     }
72     
73     augment "/config:modules/config:module/config:configuration" {
74         case dom-inmemory-data-broker {
75             when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'";
76
77
78             container schema-service {
79                 uses config:service-ref {
80                     refine type {
81                         mandatory false;
82                         config:required-identity sal:schema-service;
83                     }
84                 }
85
86             }
87
88             container config-data-store{
89                  uses config:service-ref {
90                      refine type {
91                          mandatory false;
92                          config:required-identity  config-dom-store-spi:config-dom-datastore;
93                      }
94                  }
95             }
96
97             container operational-data-store{
98                   uses config:service-ref {
99                        refine type {
100                            mandatory false;
101                            config:required-identity operational-dom-store-spi:operational-dom-datastore;
102                        }
103                    }
104             }
105
106             leaf max-data-broker-future-callback-queue-size {
107                 default 1000;
108                 type uint16;
109                 description "The maximum queue size for the data broker's commit future callback executor.";
110             }
111
112             leaf max-data-broker-future-callback-pool-size {
113                 default 20;
114                 type uint16;
115                 description "The maximum thread pool size for the data broker's commit future callback executor.";
116             }
117
118             leaf max-data-broker-commit-queue-size {
119                 default 5000;
120                 type uint16;
121                 description "The maximum queue size for the data broker's commit executor.";
122             }
123
124             leaf allow-concurrent-commits {
125                 default false;
126                 type boolean;
127                 description "Specifies whether or not to allow 3-phrase commits to run concurrently.
128                     Use with caution. If set to true, the data store implementations must be prepared
129                     to handle concurrent commits. The default is false";
130             }
131         }
132     }
133     
134     augment "/config:modules/config:module/config:state" {
135         case schema-service-singleton {
136             when "/config:modules/config:module/config:type = 'schema-service-singleton'";
137         }
138     }
139     
140     augment "/config:modules/config:module/config:state" {
141         case dom-broker-impl {
142             when "/config:modules/config:module/config:type = 'dom-broker-impl'";
143             container data {
144                 uses common:data-state;
145             } 
146         }
147     }
148 }