97078e033a9d7df46a4d28c2e129b20ccf98ef13
[controller.git] / opendaylight / config / yang-jmx-generator / src / test / resources / config-jmx-it-impl.yang
1 module config-jmx-it-impl {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:jmx:generator:it:impl";
4     prefix "it-impl";
5
6     import config-jmx-it { prefix jmxIt; revision-date 2013-06-13;}
7     import config { prefix config; revision-date 2013-04-05; }
8     import ietf-inet-types { prefix inet; revision-date 2010-09-24;}
9     import config-threads { prefix th; revision-date 2013-04-09; }
10
11
12
13     description
14         "Testing IMPL";
15
16     revision "2013-04-03" {
17         description
18             "Initial revision";
19     }
20
21     identity impl {
22         base config:module-type;
23         config:provided-service jmxIt:testing;
24         config:java-name-prefix TestImpl;
25     }
26
27     identity impl-netconf {
28         base config:module-type;
29         config:provided-service jmxIt:testing;
30         config:java-name-prefix NetconfTestImpl;
31     }
32
33     augment "/config:modules/config:module/config:configuration" {
34         case impl {
35             when "/config:modules/config:module/config:type = 'impl'";
36
37            container dto-a1 {
38                 leaf simple-arg {
39                     type uint32;
40                 }
41
42                 leaf port {
43                     type inet:port-number;
44                 }
45
46             }
47
48             leaf as-number {
49                 mandatory true;
50                 type inet:as-number;
51             }
52
53
54             leaf simpleInt {
55                 type uint32;
56                 default 99L;
57             }
58
59             container dto_b {
60                 leaf simple-int1 {
61                     type uint32;
62                 }
63
64                 leaf simple-int2 {
65                     type uint32;
66                 }
67             }
68
69         }
70     }
71
72     augment "/config:modules/config:module/config:state" {
73         case impl {
74             when "/config:modules/config:module/config:type = 'impl'";
75             // root runtime bean
76             leaf created-sessions {
77                 type uint32;
78             }
79         }
80     }
81
82     augment "/config:modules/config:module/config:configuration" {
83         case impl-netconf {
84             when "/config:modules/config:module/config:type = 'impl-netconf'";
85
86            container dto-a {
87                 leaf simple-arg {
88                     type uint32;
89                 }
90
91                 container dto-a-inner {
92                     leaf simple-arg {
93                         type uint32;
94                     }
95
96                     container dto-a-inner-inner {
97                         leaf simple-arg {
98                             type uint32;
99                         }
100                     }
101                 }
102             }
103
104             leaf simpleInt {
105                 type uint32;
106             }
107
108             leaf simpleBoolean {
109                 type boolean;
110                 default false;
111             }
112
113             leaf simple-long {
114                 type int64  ;
115             }
116
117             leaf simple-long-2 {
118                 type uint32;
119             }
120
121             leaf simple-BigInteger {
122                 type uint64;
123             }
124
125             leaf simple-byte {
126                 type int8;
127             }
128
129             leaf simple-short {
130                 type uint8;
131             }
132
133             leaf simple-test {
134                 type uint16;
135                 default 99;
136             }
137
138             leaf-list simple-list {
139                 type uint16;
140             }
141
142             container dto_c {
143                 leaf simple-int1 {
144                     type uint32;
145                 }
146
147                 leaf simple-int2 {
148                     type uint32;
149                 }
150
151                 leaf simple-int3 {
152                     type uint16;
153                 }
154
155                 leaf-list simple-list {
156                     type uint16;
157                 }
158
159                 list complex-dto-bInner {
160                     leaf-list simple-list {
161                         type uint16;
162                     }
163                     leaf simple-int3 {
164                         type uint16;
165                     }
166
167                     container deep {
168                         leaf simple-int3 {
169                             type uint16;
170                         }
171                     }
172                 }
173             }
174
175             list complex-list {
176                 list simple-list {
177                     leaf simple-int3 {
178                         type uint16;
179                     }
180                 }
181             }
182
183             list peers {
184                     config:java-name-prefix Peer;
185                     leaf port {
186                         type string;
187                     }
188                     leaf core-size {
189                         type uint32;
190                     }
191                     leaf simple-int3 {
192                         type uint16;
193                     }
194             }
195
196             container thread-factory {
197                 uses config:service-ref {
198                     refine type {
199                         mandatory false;
200                         config:required-identity th:threadfactory;
201                     }
202                 }
203             }
204         }
205     }
206
207     augment "/config:modules/config:module/config:state" {
208         case impl-netconf {
209             when "/config:modules/config:module/config:type = 'impl-netconf'";
210             // root runtime bean
211             leaf created-sessions {
212                 type uint32;
213             }
214
215         }
216     }
217 }