4456dea77f98fad1f4f43c79f67b224d9e44990e
[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 true;
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     }
124
125     augment "/config:modules/config:module/config:configuration" {
126         case binding-data-broker {
127             when "/config:modules/config:module/config:type = 'binding-data-broker'";
128             container dom-broker {
129                 uses config:service-ref {
130                     refine type {
131                         mandatory true;
132                         config:required-identity dom:dom-broker-osgi-registry;
133                     }
134                 }
135             }
136
137             container mapping-service {
138                 uses config:service-ref {
139                     refine type {
140                         mandatory true;
141                         config:required-identity binding-dom-mapping-service;
142                     }
143                 }
144             }
145         }
146     }
147
148     augment "/config:modules/config:module/config:configuration" {
149         case binding-data-compatible-broker {
150             when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
151
152             uses dom-forwarding-component;
153         }
154     }
155     
156     augment "/config:modules/config:module/config:configuration" {
157         case binding-forwarded-data-broker {
158             when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
159             container binding-forwarded-data-broker {
160                 uses dom-forwarding-component;
161             }
162         }
163     }
164
165
166     augment "/config:modules/config:module/config:state" {
167         case runtime-generated-mapping {
168             when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
169         }
170     }
171
172     augment "/config:modules/config:module/config:state" {
173         case binding-data-broker {
174             when "/config:modules/config:module/config:type = 'binding-data-broker'";
175             container data {
176                 uses common:data-state;
177             }
178         }
179     }
180     augment "/config:modules/config:module/config:state" {
181         case binding-rpc-broker {
182             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
183             uses common:rpc-state;
184         }
185     }
186     augment "/config:modules/config:module/config:state" {
187         case binding-notification-broker {
188             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
189             uses common:notification-state;
190         }
191     }
192 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.