HONEYCOMB-34: Config tree initialization using binding data broker
[honeycomb.git] / v3po / 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 vpp-japi-cfg { prefix vjc; revision-date 2016-04-06; }
10     import translate-api { prefix tapi; revision-date 2016-04-06; }
11     import data-api { prefix dapi; revision-date 2016-04-11; }
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 broker {
31                 uses config:service-ref {
32                     refine type {
33                         mandatory true;
34                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
35                     }
36                 }
37             }
38
39             container dom-broker {
40                 uses config:service-ref {
41                     refine type {
42                         mandatory true;
43                         config:required-identity dom:dom-broker-osgi-registry;
44                     }
45                 }
46             }
47
48             container vpp-japi {
49                 uses config:service-ref {
50                     refine type {
51                         mandatory true;
52                         config:required-identity vjc:vpp-japi;
53                     }
54                 }
55             }
56
57             container serializer {
58                 uses config:service-ref {
59                     refine type {
60                         mandatory true;
61                         config:required-identity md-sal-binding:binding-normalized-node-serializer;
62                     }
63                 }
64             }
65
66             container dom-data-broker {
67                 uses config:service-ref {
68                     refine type {
69                         mandatory true;
70                         config:required-identity dom:dom-async-data-broker;
71                     }
72                 }
73             }
74
75         }
76     }
77
78     identity binding-broker-netconf {
79         base config:module-type;
80         config:provided-service md-sal-binding:binding-broker-osgi-registry;
81         config:java-name-prefix NetconfBindingBroker;
82     }
83
84     augment "/config:modules/config:module/config:configuration" {
85         case binding-broker-netconf {
86             when "/config:modules/config:module/config:type = 'binding-broker-netconf'";
87
88                 container netconf-binding-broker {
89                     uses config:service-ref {
90                         refine type {
91                             mandatory true;
92                             config:required-identity md-sal-binding:binding-async-data-broker;
93                         }
94                     }
95                 }
96
97         }
98     }
99
100     identity honeycomb-dom-data-broker {
101         base config:module-type;
102         config:provided-service dom:dom-async-data-broker;
103         config:java-name-prefix DataBroker;
104     }
105
106     augment "/config:modules/config:module/config:configuration" {
107         case honeycomb-dom-data-broker {
108             when "/config:modules/config:module/config:type = 'honeycomb-dom-data-broker'";
109
110             container config-data-tree {
111                 uses config:service-ref {
112                     refine type {
113                         mandatory true;
114                         config:required-identity dapi:honeycomb-modifiable-data-tree;
115                     }
116                 }
117             }
118
119             container operational-data-tree {
120                 uses config:service-ref {
121                     refine type {
122                         mandatory true;
123                         config:required-identity dapi:honeycomb-readable-data-tree;
124                     }
125                 }
126             }
127
128         }
129     }
130 }