Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec for write...
[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     identity binding-broker-impl {
25         base config:module-type;
26         config:provided-service sal:binding-broker-osgi-registry;
27         config:provided-service sal:binding-rpc-registry;
28         config:java-name-prefix BindingBrokerImpl;
29     }
30
31     identity binding-data-compatible-broker {
32         base config:module-type;
33         config:provided-service sal:binding-data-broker;
34         config:provided-service sal:binding-data-consumer-broker;
35         config:java-name-prefix ForwardedCompatibleDataBrokerImpl;
36     }
37     
38     identity binding-forwarded-data-broker {
39         base config:module-type;
40         config:provided-service sal:binding-async-data-broker;
41         config:java-name-prefix BindingAsyncDataBrokerImpl;
42     }
43
44     identity binding-rpc-broker {
45         base config:module-type;
46         config:provided-service sal:binding-rpc-registry;
47         config:java-name-prefix RpcBrokerImpl;
48     }
49
50     identity binding-notification-broker {
51         base config:module-type;
52         config:provided-service sal:binding-notification-service;
53         config:provided-service sal:binding-notification-subscription-service;
54         config:java-name-prefix NotificationBrokerImpl;
55     }
56
57     identity runtime-generated-mapping {
58         base config:module-type;
59         config:provided-service binding-dom-mapping-service;
60         config:java-name-prefix RuntimeMapping;
61     }
62
63     grouping dom-forwarding-component {
64         container dom-async-broker {
65                 uses config:service-ref {
66                     refine type {
67                         mandatory true;
68                         config:required-identity dom:dom-broker-osgi-registry;
69                     }
70                 }
71             }
72
73         container binding-mapping-service {
74             uses config:service-ref {
75                 refine type {
76                     mandatory true;
77                     config:required-identity binding-dom-mapping-service;
78                 }
79             }
80         }
81     }
82
83     augment "/config:modules/config:module/config:configuration" {
84         case binding-broker-impl {
85             when "/config:modules/config:module/config:type = 'binding-broker-impl'";
86
87             /*
88             container rpc-registry {
89                 uses config:service-ref {
90                     refine type {
91                         mandatory true;
92                         config:required-identity sal:binding-rpc-registry;
93                     }
94                 }
95             }*/
96
97             container data-broker {
98                 uses config:service-ref {
99                     refine type {
100                         mandatory false;
101                         config:required-identity sal:binding-data-broker;
102                     }
103                 }
104             }
105
106             container notification-service {
107                 uses config:service-ref {
108                     refine type {
109                         mandatory true;
110                         config:required-identity sal:binding-notification-service;
111                     }
112                 }
113             }
114
115             container root-data-broker {
116                 uses config:service-ref {
117                     refine type {
118                         mandatory false;
119                         config:required-identity sal:binding-async-data-broker;
120                     }
121                 }
122             }
123         }
124     }
125
126     augment "/config:modules/config:module/config:configuration" {
127         case binding-data-compatible-broker {
128             when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
129
130             uses dom-forwarding-component;
131         }
132     }
133     
134     augment "/config:modules/config:module/config:configuration" {
135         case binding-forwarded-data-broker {
136             when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
137             container binding-forwarded-data-broker {
138                 uses dom-forwarding-component;
139             }
140         }
141     }
142
143
144     augment "/config:modules/config:module/config:state" {
145         case runtime-generated-mapping {
146             when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
147         }
148     }
149
150     augment "/config:modules/config:module/config:state" {
151         case binding-rpc-broker {
152             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
153             uses common:rpc-state;
154         }
155     }
156     augment "/config:modules/config:module/config:state" {
157         case binding-notification-broker {
158             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
159             uses common:notification-state;
160         }
161     }
162 }