Merge "Bug 164"
[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.sal.binding.impl.connect.dom.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:java-name-prefix BindingBrokerImpl;
29     }
30     
31     identity binding-data-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 DataBrokerImpl;
36     }
37     
38     identity binding-rpc-broker {
39         base config:module-type;
40         config:provided-service sal:binding-rpc-registry;
41         config:java-name-prefix RpcBrokerImpl;
42     }
43     
44     identity binding-notification-broker {
45         base config:module-type;
46         config:provided-service sal:binding-notification-service;
47         config:provided-service sal:binding-notification-subscription-service;
48         config:java-name-prefix NotificationBrokerImpl;
49     }
50
51     identity runtime-generated-mapping {
52         base config:module-type;
53         config:provided-service binding-dom-mapping-service;
54         config:java-name-prefix RuntimeMapping;
55     }
56
57     augment "/config:modules/config:module/config:configuration" {
58         case binding-broker-impl {
59             when "/config:modules/config:module/config:type = 'binding-broker-impl'";
60             
61             /*
62             container rpc-registry {
63                 uses config:service-ref {
64                     refine type {
65                         mandatory true;
66                         config:required-identity sal:binding-rpc-registry;
67                     }
68                 }
69             }*/
70             
71             container data-broker {
72                 uses config:service-ref {
73                     refine type {
74                         mandatory true;
75                         config:required-identity sal:binding-data-broker;
76                     }
77                 }
78             }
79             
80             container notification-service {
81                 uses config:service-ref {
82                     refine type {
83                         mandatory true;
84                         config:required-identity sal:binding-notification-service;
85                     }
86                 }
87             } 
88         }
89     }
90     
91     augment "/config:modules/config:module/config:configuration" {
92         case binding-data-broker {
93             when "/config:modules/config:module/config:type = 'binding-data-broker'";
94             container dom-broker {
95                 uses config:service-ref {
96                     refine type {
97                         mandatory true;
98                         config:required-identity dom:dom-broker-osgi-registry;
99                     }
100                 }
101             }
102             container mapping-service {
103                 uses config:service-ref {
104                     refine type {
105                         mandatory true;
106                         config:required-identity binding-dom-mapping-service;
107                     }
108                 }
109             } 
110         }
111     }
112     
113
114     augment "/config:modules/config:module/config:state" {
115         case runtime-generated-mapping {
116             when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
117         }
118     }
119
120     augment "/config:modules/config:module/config:state" {
121         case binding-data-broker {
122             when "/config:modules/config:module/config:type = 'binding-data-broker'";
123             uses common:data-state;
124         }
125     }
126     augment "/config:modules/config:module/config:state" {
127         case binding-rpc-broker {
128             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
129             uses common:rpc-state;
130         }
131     }
132     augment "/config:modules/config:module/config:state" {
133         case binding-notification-broker {
134             when "/config:modules/config:module/config:type = 'binding-notification-broker'";
135             uses common:notification-state;
136         }
137     }
138 }