Removed getClass comparison if FlowComparator.
[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.yangtools.yang.data.impl.codec.BindingIndependentMappingService";
22     }
23
24
25     identity binding-broker-impl {
26         base config:module-type;
27         config:provided-service sal:binding-broker-osgi-registry;
28         config:provided-service sal:binding-rpc-registry;
29         config:java-name-prefix BindingBrokerImpl;
30     }
31
32     identity binding-data-broker {
33         base config:module-type;
34         config:provided-service sal:binding-data-broker;
35         config:provided-service sal:binding-data-consumer-broker;
36         config:java-name-prefix DataBrokerImpl;
37     }
38
39     identity binding-data-compatible-broker {
40         base config:module-type;
41         config:provided-service sal:binding-data-broker;
42         config:provided-service sal:binding-data-consumer-broker;
43         config:java-name-prefix ForwardedCompatibleDataBrokerImpl;
44     }
45     
46     identity binding-forwarded-data-broker {
47         base config:module-type;
48         config:provided-service sal:binding-async-data-broker;
49         config:java-name-prefix BindingAsyncDataBrokerImpl;
50     }
51
52     identity binding-rpc-broker {
53         base config:module-type;
54         config:provided-service sal:binding-rpc-registry;
55         config:java-name-prefix RpcBrokerImpl;
56     }
57
58     identity binding-notification-broker {
59         base config:module-type;
60         config:provided-service sal:binding-notification-service;
61         config:provided-service sal:binding-notification-subscription-service;
62         config:java-name-prefix NotificationBrokerImpl;
63     }
64
65     identity runtime-generated-mapping {
66         base config:module-type;
67         config:provided-service binding-dom-mapping-service;
68         config:java-name-prefix RuntimeMapping;
69     }
70
71     grouping dom-forwarding-component {
72         container dom-async-broker {
73                 uses config:service-ref {
74                     refine type {
75                         mandatory true;
76                         config:required-identity dom:dom-broker-osgi-registry;
77                     }
78                 }
79             }
80
81         container binding-mapping-service {
82             uses config:service-ref {
83                 refine type {
84                     mandatory true;
85                     config:required-identity binding-dom-mapping-service;
86                 }
87             }
88         }
89     }
90
91     augment "/config:modules/config:module/config:configuration" {
92         case binding-broker-impl {
93             when "/config:modules/config:module/config:type = 'binding-broker-impl'";
94
95             /*
96             container rpc-registry {
97                 uses config:service-ref {
98                     refine type {
99                         mandatory true;
100                         config:required-identity sal:binding-rpc-registry;
101                     }
102                 }
103             }*/
104
105             container data-broker {
106                 uses config:service-ref {
107                     refine type {
108                         mandatory false;
109                         config:required-identity sal:binding-data-broker;
110                     }
111                 }
112             }
113
114             container notification-service {
115                 uses config:service-ref {
116                     refine type {
117                         mandatory true;
118                         config:required-identity sal:binding-notification-service;
119                     }
120                 }
121             }
122
123             container root-data-broker {
124                 uses config:service-ref {
125                     refine type {
126                         mandatory false;
127                         config:required-identity sal:binding-async-data-broker;
128                     }
129                 }
130             }
131         }
132     }
133
134     augment "/config:modules/config:module/config:configuration" {
135         case binding-data-broker {
136             when "/config:modules/config:module/config:type = 'binding-data-broker'";
137             container dom-broker {
138                 uses config:service-ref {
139                     refine type {
140                         mandatory true;
141                         config:required-identity dom:dom-broker-osgi-registry;
142                     }
143                 }
144             }
145
146             container mapping-service {
147                 uses config:service-ref {
148                     refine type {
149                         mandatory true;
150                         config:required-identity binding-dom-mapping-service;
151                     }
152                 }
153             }
154         }
155     }
156
157     augment "/config:modules/config:module/config:configuration" {
158         case binding-data-compatible-broker {
159             when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
160
161             uses dom-forwarding-component;
162         }
163     }
164     
165     augment "/config:modules/config:module/config:configuration" {
166         case binding-forwarded-data-broker {
167             when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
168             container binding-forwarded-data-broker {
169                 uses dom-forwarding-component;
170             }
171         }
172     }
173
174
175     augment "/config:modules/config:module/config:state" {
176         case runtime-generated-mapping {
177             when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
178         }
179     }
180
181     augment "/config:modules/config:module/config:state" {
182         case binding-data-broker {
183             when "/config:modules/config:module/config:type = 'binding-data-broker'";
184             container data {
185                 uses common:data-state;
186             }
187         }
188     }
189     augment "/config:modules/config:module/config:state" {
190         case binding-rpc-broker {
191             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
192             uses common:rpc-state;
193         }
194     }
195     augment "/config:modules/config:module/config:state" {
196         case binding-notification-broker {
197             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
198             uses common:notification-state;
199         }
200     }
201 }