HONEYCOMB-130: Separate v3po plugin from HC infra
[honeycomb.git] / infra / impl / src / main / yang / v3po-impl.yang
1 module v3po-impl {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:v3po:impl";
4     prefix "v3po-impl";
5
6     import config { prefix config; revision-date 2013-04-05; }
7     import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
8     import opendaylight-md-sal-dom {prefix dom;}
9     import translate-api { prefix tapi; revision-date 2016-04-06; }
10     import data-api { prefix dapi; revision-date 2016-04-11; }
11     import notification-api { prefix hc-notif-a; revision-date 2016-06-01; }
12
13     description
14         "Service definition for v3po project";
15
16     revision "2014-12-10" {
17         description
18             "Initial revision";
19     }
20
21     identity v3po {
22         base config:module-type;
23         config:provided-service dom:dom-broker-osgi-registry;
24         config:java-name-prefix V3po;
25     }
26
27     augment "/config:modules/config:module/config:configuration" {
28         case v3po {
29             when "/config:modules/config:module/config:type = 'v3po'";
30             container dom-broker {
31                 uses config:service-ref {
32                     refine type {
33                         mandatory true;
34                         config:required-identity dom:dom-broker-osgi-registry;
35                     }
36                 }
37             }
38
39             container honeycomb-dom-data-broker {
40                 uses config:service-ref {
41                     refine type {
42                         mandatory true;
43                         config:required-identity dom:dom-async-data-broker;
44                     }
45                 }
46             }
47
48             container honeycomb-dom-notification-service {
49                 uses config:service-ref {
50                     refine type {
51                         mandatory true;
52                         config:required-identity hc-notif-a:dom-notification-service;
53                     }
54                 }
55             }
56
57         }
58     }
59
60     identity binding-broker-netconf {
61         base config:module-type;
62         config:provided-service md-sal-binding:binding-broker-osgi-registry;
63         config:java-name-prefix NetconfBindingBroker;
64     }
65
66     augment "/config:modules/config:module/config:configuration" {
67         case binding-broker-netconf {
68             when "/config:modules/config:module/config:type = 'binding-broker-netconf'";
69
70                 container netconf-binding-broker {
71                     uses config:service-ref {
72                         refine type {
73                             mandatory true;
74                             config:required-identity md-sal-binding:binding-async-data-broker;
75                         }
76                     }
77                 }
78
79         }
80     }
81
82     identity honeycomb-dom-data-broker {
83         base config:module-type;
84         config:provided-service dom:dom-async-data-broker;
85         config:java-name-prefix DataBroker;
86     }
87
88     augment "/config:modules/config:module/config:configuration" {
89         case honeycomb-dom-data-broker {
90             when "/config:modules/config:module/config:type = 'honeycomb-dom-data-broker'";
91
92             container config-data-tree {
93                 uses config:service-ref {
94                     refine type {
95                         mandatory true;
96                         config:required-identity dapi:honeycomb-modifiable-data-tree;
97                     }
98                 }
99             }
100
101             container operational-data-tree {
102                 uses config:service-ref {
103                     refine type {
104                         mandatory true;
105                         config:required-identity dapi:honeycomb-readable-data-tree;
106                     }
107                 }
108             }
109
110         }
111     }
112
113     identity honeycomb-context-dom-data-broker {
114         base config:module-type;
115         config:provided-service dom:dom-async-data-broker;
116         config:java-name-prefix ContextDataBroker;
117         description "DomBroker on top of context data-tree";
118     }
119
120     augment "/config:modules/config:module/config:configuration" {
121         case honeycomb-context-dom-data-broker {
122             when "/config:modules/config:module/config:type = 'honeycomb-context-dom-data-broker'";
123
124             container context-data-tree {
125                 uses config:service-ref {
126                     refine type {
127                         mandatory true;
128                         config:required-identity dapi:data-tree;
129                     }
130                 }
131             }
132         }
133     }
134
135     identity netconf-monitoring-reader {
136         base config:module-type;
137         config:provided-service tapi:honeycomb-reader-factory;
138     }
139
140     augment "/config:modules/config:module/config:configuration" {
141         case netconf-monitoring-reader {
142             when "/config:modules/config:module/config:type = 'netconf-monitoring-reader'";
143
144             container netconf-monitoring-binding-broker {
145                 uses config:service-ref {
146                     refine type {
147                         mandatory true;
148                         config:required-identity md-sal-binding:binding-async-data-broker;
149                     }
150                 }
151             }
152
153         }
154     }
155 }