a56e2f9e32d18ca67f85a0e40275eb541bc6c7ef
[controller.git] / opendaylight / md-sal / sal-binding-config / src / main / yang / opendaylight-binding-broker-impl.yang
1 module opendaylight-sal-binding-broker-impl {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl";
4     prefix "binding-impl";
5
6     import config { prefix config; revision-date 2013-04-05; }
7     import opendaylight-md-sal-binding {prefix sal;}
8     import opendaylight-md-sal-dom {prefix dom;}
9     import opendaylight-md-sal-common {prefix common;}
10
11     description
12         "Service definition for Binding Aware MD-SAL.";
13
14     revision "2013-10-28" {
15         description
16             "Initial revision";
17     }
18
19     identity binding-dom-mapping-service {
20         base config:service-type;
21         config:java-class "org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec";
22         config:disable-osgi-service-registration;
23     }
24
25     /* FIXME: move to opendaylight-md-sal-binding (cannot be there due to Class name confict with old implementation)*/
26     identity binding-new-notification-service {
27         base config:service-type;
28         config:java-class "org.opendaylight.controller.md.sal.binding.api.NotificationService";
29         config:disable-osgi-service-registration;
30     }
31
32     /* TODO: move to opendaylight-md-sal-binding (cannot be there due to Class name confict with old implementation)*/
33     identity binding-new-notification-publish-service {
34         base config:service-type;
35         config:java-class "org.opendaylight.controller.md.sal.binding.api.NotificationPublishService";
36         config:disable-osgi-service-registration;
37     }
38
39     identity binding-broker-impl {
40         base config:module-type;
41         config:provided-service sal:binding-broker-osgi-registry;
42         config:provided-service sal:binding-rpc-registry;
43         config:java-name-prefix BindingBrokerImpl;
44     }
45
46     identity binding-data-compatible-broker {
47         base config:module-type;
48         config:provided-service sal:binding-data-broker;
49         config:provided-service sal:binding-data-consumer-broker;
50         config:java-name-prefix ForwardedCompatibleDataBrokerImpl;
51     }
52
53     identity binding-forwarded-data-broker {
54         base config:module-type;
55         config:provided-service sal:binding-async-data-broker;
56         config:java-name-prefix BindingAsyncDataBrokerImpl;
57     }
58
59     identity binding-rpc-broker {
60         base config:module-type;
61         config:provided-service sal:binding-rpc-registry;
62         config:java-name-prefix RpcBrokerImpl;
63     }
64
65     identity binding-notification-broker {
66         base config:module-type;
67         config:provided-service sal:binding-notification-service;
68         config:provided-service sal:binding-notification-subscription-service;
69         config:java-name-prefix NotificationBrokerImpl;
70     }
71
72     identity runtime-generated-mapping {
73         base config:module-type;
74         config:provided-service binding-dom-mapping-service;
75         config:provided-service sal:binding-codec-tree-factory;
76         config:provided-service sal:binding-normalized-node-serializer;
77         config:java-name-prefix RuntimeMapping;
78     }
79
80     identity binding-notification-adapter {
81         base config:module-type;
82         config:provided-service binding-new-notification-service;
83         config:java-name-prefix BindingNotificationAdapter;
84     }
85
86     identity binding-notification-publish-adapter {
87         base config:module-type;
88         config:provided-service binding-new-notification-publish-service;
89         config:java-name-prefix BindingNotificationPublishAdapter;
90     }
91
92     grouping dom-forwarding-component {
93         container dom-async-broker {
94                 uses config:service-ref {
95                     refine type {
96                         mandatory true;
97                         config:required-identity dom:dom-broker-osgi-registry;
98                     }
99                 }
100             }
101
102         container binding-mapping-service {
103             uses config:service-ref {
104                 refine type {
105                     mandatory true;
106                     config:required-identity binding-dom-mapping-service;
107                 }
108             }
109         }
110     }
111
112     augment "/config:modules/config:module/config:configuration" {
113         case binding-broker-impl {
114             when "/config:modules/config:module/config:type = 'binding-broker-impl'";
115
116             /*
117             container rpc-registry {
118                 uses config:service-ref {
119                     refine type {
120                         mandatory true;
121                         config:required-identity sal:binding-rpc-registry;
122                     }
123                 }
124             }*/
125             container binding-broker-impl {
126                 uses dom-forwarding-component;
127     
128                 container data-broker {
129                     uses config:service-ref {
130                         refine type {
131                             mandatory false;
132                             config:required-identity sal:binding-data-broker;
133                         }
134                     }
135                 }
136     
137                 container notification-service {
138                     uses config:service-ref {
139                         refine type {
140                             mandatory false;
141                             config:required-identity sal:binding-notification-service;
142                         }
143                     }
144                 }
145     
146                 container root-data-broker {
147                     uses config:service-ref {
148                         refine type {
149                             mandatory false;
150                             config:required-identity sal:binding-async-data-broker;
151                         }
152                     }
153                 }
154
155                 container notification-publish-service {
156                     uses config:service-ref {
157                         refine type {
158                             mandatory false;
159                             config:required-identity binding-new-notification-publish-service;
160                         }
161                         refine name {
162                             mandatory false;
163                         }
164                     }
165                 }
166             }
167         }
168     }
169
170     augment "/config:modules/config:module/config:configuration" {
171         case binding-data-compatible-broker {
172             when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
173
174             container binding-data-compatible-broker {
175                 container data-broker {
176                     uses config:service-ref {
177                         refine type {
178                             mandatory false;
179                             config:required-identity sal:binding-async-data-broker;
180                         }
181                     }
182                 }
183             }
184         }
185     }
186
187     augment "/config:modules/config:module/config:configuration" {
188         case binding-forwarded-data-broker {
189             when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
190             container binding-forwarded-data-broker {
191                 container dom-async-broker {
192                     uses config:service-ref {
193                         refine type {
194                             mandatory true;
195                             config:required-identity dom:dom-async-data-broker;
196                         }
197                     }
198                 }
199
200                 container binding-mapping-service {
201                     uses config:service-ref {
202                         refine type {
203                             mandatory true;
204                             config:required-identity binding-dom-mapping-service;
205                         }
206                     }
207                 }
208
209                 container schema-service {
210                     uses config:service-ref {
211                         refine type {
212                             mandatory true;
213                             config:required-identity dom:schema-service;
214                         }
215                     }
216                 }
217             }
218         }
219     }
220
221
222     augment "/config:modules/config:module/config:configuration" {
223         case runtime-generated-mapping {
224             when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
225             leaf wait-for-schema {
226                 default "false";
227                 type boolean;
228             }
229         }
230     }
231
232     augment "/config:modules/config:module/config:state" {
233         case binding-rpc-broker {
234             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
235             uses common:rpc-state;
236         }
237     }
238
239     augment "/config:modules/config:module/config:configuration" {
240         case binding-notification-broker {
241             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
242             container notification-adapter {
243                 uses config:service-ref {
244                     refine type {
245                         mandatory false;
246                         config:required-identity binding-new-notification-service;
247                     }
248                 }
249             }
250
251             container notification-publish-adapter {
252                 uses config:service-ref {
253                     refine type {
254                         mandatory false;
255                         config:required-identity binding-new-notification-publish-service;
256                     }
257                 }
258             }
259         }
260     }
261
262     augment "/config:modules/config:module/config:state" {
263         case binding-notification-broker {
264             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
265             uses common:notification-state;
266         }
267     }
268
269     augment "/config:modules/config:module/config:configuration" {
270         case binding-notification-adapter {
271             when "/config:modules/config:module/config:type = 'binding-notification-adapter'";
272             container binding-notification-adapter {
273                 uses dom-forwarding-component;
274             }
275         }
276     }
277
278     augment "/config:modules/config:module/config:configuration" {
279         case binding-notification-publish-adapter {
280             when "/config:modules/config:module/config:type = 'binding-notification-publish-adapter'";
281             container binding-notification-publish-adapter {
282                 uses dom-forwarding-component;
283             }
284         }
285     }
286 }