Merge "BUG 2854 : Do not add empty read write transactions to the replicable journal"
[controller.git] / opendaylight / md-sal / sal-binding-broker / 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:java-name-prefix RuntimeMapping;
74     }
75
76     identity binding-notification-adapter {
77         base config:module-type;
78         config:provided-service binding-new-notification-service;
79         config:java-name-prefix BindingNotificationAdapter;
80     }
81
82     identity binding-notification-publish-adapter {
83         base config:module-type;
84         config:provided-service binding-new-notification-publish-service;
85         config:java-name-prefix BindingNotificationPublishAdapter;
86     }
87
88     grouping dom-forwarding-component {
89         container dom-async-broker {
90                 uses config:service-ref {
91                     refine type {
92                         mandatory true;
93                         config:required-identity dom:dom-broker-osgi-registry;
94                     }
95                 }
96             }
97
98         container binding-mapping-service {
99             uses config:service-ref {
100                 refine type {
101                     mandatory true;
102                     config:required-identity binding-dom-mapping-service;
103                 }
104             }
105         }
106     }
107
108     augment "/config:modules/config:module/config:configuration" {
109         case binding-broker-impl {
110             when "/config:modules/config:module/config:type = 'binding-broker-impl'";
111
112             /*
113             container rpc-registry {
114                 uses config:service-ref {
115                     refine type {
116                         mandatory true;
117                         config:required-identity sal:binding-rpc-registry;
118                     }
119                 }
120             }*/
121             container binding-broker-impl {
122                 uses dom-forwarding-component;
123     
124                 container data-broker {
125                     uses config:service-ref {
126                         refine type {
127                             mandatory false;
128                             config:required-identity sal:binding-data-broker;
129                         }
130                     }
131                 }
132     
133                 container notification-service {
134                     uses config:service-ref {
135                         refine type {
136                             mandatory true;
137                             config:required-identity sal:binding-notification-service;
138                         }
139                     }
140                 }
141     
142                 container root-data-broker {
143                     uses config:service-ref {
144                         refine type {
145                             mandatory false;
146                             config:required-identity sal:binding-async-data-broker;
147                         }
148                     }
149                 }
150             }
151         }
152     }
153
154     augment "/config:modules/config:module/config:configuration" {
155         case binding-data-compatible-broker {
156             when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
157
158             container binding-data-compatible-broker {
159                 container data-broker {
160                     uses config:service-ref {
161                         refine type {
162                             mandatory false;
163                             config:required-identity sal:binding-async-data-broker;
164                         }
165                     }
166                 }
167             }
168         }
169     }
170
171     augment "/config:modules/config:module/config:configuration" {
172         case binding-forwarded-data-broker {
173             when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
174             container binding-forwarded-data-broker {
175                 container dom-async-broker {
176                     uses config:service-ref {
177                         refine type {
178                             mandatory true;
179                             config:required-identity dom:dom-async-data-broker;
180                         }
181                     }
182                 }
183
184                 container binding-mapping-service {
185                     uses config:service-ref {
186                         refine type {
187                             mandatory true;
188                             config:required-identity binding-dom-mapping-service;
189                         }
190                     }
191                 }
192
193                 container schema-service {
194                     uses config:service-ref {
195                         refine type {
196                             mandatory false;
197                             config:required-identity dom:schema-service;
198                         }
199                     }
200                 }
201             }
202         }
203     }
204
205
206     augment "/config:modules/config:module/config:state" {
207         case runtime-generated-mapping {
208             when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
209         }
210     }
211
212     augment "/config:modules/config:module/config:state" {
213         case binding-rpc-broker {
214             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
215             uses common:rpc-state;
216         }
217     }
218
219     augment "/config:modules/config:module/config:state" {
220         case binding-notification-broker {
221             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
222             uses common:notification-state;
223         }
224     }
225
226     augment "/config:modules/config:module/config:configuration" {
227         case binding-notification-adapter {
228             when "/config:modules/config:module/config:type = 'binding-notification-adapter'";
229             container binding-notification-adapter {
230                 uses dom-forwarding-component;
231             }
232         }
233     }
234
235     augment "/config:modules/config:module/config:configuration" {
236         case binding-notification-publish-adapter {
237             when "/config:modules/config:module/config:type = 'binding-notification-publish-adapter'";
238             container binding-notification-publish-adapter {
239                 uses dom-forwarding-component;
240             }
241         }
242     }
243 }