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