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