Merge "Refactor Additional header for netconf hello message."
[controller.git] / opendaylight / md-sal / sal-restconf-broker / src / main / yang / opendaylight-restconf-broker-impl.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module opendaylight-sal-restconf-broker-impl {
3         yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:restconf:broker";
5     prefix "restconf-impl";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import opendaylight-md-sal-binding {prefix sal;}
9     import opendaylight-md-sal-dom {prefix dom;}
10     import opendaylight-md-sal-common {prefix common;}
11
12     description
13         "Service definition for Restconf MD-SAL.";
14  
15     revision "2014-02-10" {
16         description
17             "Initial revision";
18     }
19
20     identity binding-dom-mapping-service {
21         base config:service-type;
22         config:java-class "org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService";
23     }
24
25
26     identity restconf-broker-impl {
27         base config:module-type;
28         config:provided-service sal:binding-data-consumer-broker;
29         config:provided-service sal:binding-notification-subscription-service;
30         /*TODO provide RpcConsumerRegistry*/
31         config:java-name-prefix SalRemoteServiceBroker;
32     }
33     
34     identity restconf-data-broker {
35         base config:module-type;
36         config:provided-service sal:binding-data-broker;
37         config:java-name-prefix DataBrokerImpl;
38     }
39     
40     identity restconf-rpc-broker {
41         base config:module-type;
42         config:provided-service sal:binding-rpc-registry;
43         config:java-name-prefix RpcBrokerImpl;
44     }
45     
46     identity restconf-notification-broker {
47         base config:module-type;
48         config:provided-service sal:binding-notification-service;
49         config:java-name-prefix NotificationBrokerImpl;
50     }
51
52     identity restconf-runtime-generated-mapping {
53         base config:module-type;
54         config:provided-service binding-dom-mapping-service;
55         config:java-name-prefix RuntimeMapping;
56     }
57
58     augment "/config:modules/config:module/config:configuration" {
59         case restconf-broker-impl {
60             when "/config:modules/config:module/config:type = 'restconf-broker-impl'";
61             
62             /*
63             container rpc-registry {
64                 uses config:service-ref {
65                     refine type {
66                         mandatory true;
67                         config:required-identity sal:binding-rpc-registry;
68                     }
69                 }
70             }*/
71             
72             container data-broker {
73                 uses config:service-ref {
74                     refine type {
75                         mandatory true;
76                         config:required-identity sal:binding-data-broker;
77                     }
78                 }
79             }
80             
81             container notification-service {
82                 uses config:service-ref {
83                     refine type {
84                         mandatory true;
85                         config:required-identity sal:binding-notification-service;
86                     }
87                 }
88             }
89         }
90     }
91
92     augment "/config:modules/config:module/config:configuration" {
93         case restconf-data-broker {
94             when "/config:modules/config:module/config:type = 'restconf-data-broker'";
95             container dom-broker {
96                 uses config:service-ref {
97                     refine type {
98                         mandatory true;
99                         config:required-identity dom:dom-broker-osgi-registry;
100                     }
101                 }
102             }
103
104             container mapping-service {
105                 uses config:service-ref {
106                     refine type {
107                         mandatory true;
108                         config:required-identity binding-dom-mapping-service;
109                     }
110                 }
111             } 
112         }
113     }
114     
115
116     augment "/config:modules/config:module/config:state" {
117         case restconf-runtime-generated-mapping {
118             when "/config:modules/config:module/config:type = 'restconf-runtime-generated-mapping'";
119         }
120     }
121
122     augment "/config:modules/config:module/config:state" {
123         case restconf-data-broker {
124             when "/config:modules/config:module/config:type = 'restconf-data-broker'";
125             container data {
126                 uses common:data-state;
127             }
128         }
129     }
130     augment "/config:modules/config:module/config:state" {
131         case restconf-rpc-broker {
132             when "/config:modules/config:module/config:type = 'restconf-rpc-broker'";
133             uses common:rpc-state;
134         }
135     }
136     augment "/config:modules/config:module/config:state" {
137         case restconf-notification-broker {
138             when "/config:modules/config:module/config:type = 'restconf-notification-broker'";
139             uses common:notification-state;
140         }
141     }
142 }