Bug 2444 - fix of several issues in yang-model-export
[yangtools.git] / yang / yang-model-export / src / test / resources / schema-context-emitter-test / foo.yin
1 <module xmlns="urn:ietf:params:xml:ns:yang:yin:1" xmlns:foo-prefix="foo-namespace" name="foo">
2     <yang-version value="1"></yang-version>
3     <namespace uri="foo-namespace"></namespace>
4     <prefix value="foo-prefix"></prefix>
5     <revision date="2016-08-05"></revision>
6     <extension name="test-extension">
7         <status value="current"></status>
8     </extension>
9     <feature name="test-feature">
10         <status value="current"></status>
11         <description>
12             <text>test-feature description</text>
13         </description>
14         <reference>
15             <text>test-feature reference</text>
16         </reference>
17     </feature>
18     <identity name="test-identity">
19         <base name="test-base-identity"></base>
20         <status value="current"></status>
21         <description>
22             <text>test-identity description</text>
23         </description>
24         <reference>
25             <text>test-identity reference</text>
26         </reference>
27     </identity>
28     <identity name="test-base-identity">
29         <status value="current"></status>
30     </identity>
31     <typedef name="test-uint32-typedef">
32         <type name="uint32">
33             <range value="50..100">
34                 <error-message>
35                     <value>The argument is out of bounds &lt;50, 100&gt;</value>
36                 </error-message>
37                 <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
38             </range>
39         </type>
40         <units name="seconds"></units>
41         <status value="current"></status>
42     </typedef>
43     <typedef name="test-int32-typedef">
44         <type name="int32">
45             <range value="50..100">
46                 <error-message>
47                     <value>The argument is out of bounds &lt;50, 100&gt;</value>
48                 </error-message>
49                 <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
50             </range>
51         </type>
52         <status value="current"></status>
53     </typedef>
54     <typedef name="test-leafref-typedef">
55         <type name="leafref">
56             <path value="../leafref-target-leaf"></path>
57         </type>
58         <status value="current"></status>
59     </typedef>
60     <typedef name="test-iid-typedef">
61         <type name="instance-identifier">
62             <require-instance value="false"></require-instance>
63         </type>
64         <status value="current"></status>
65     </typedef>
66     <grouping name="test-grouping-1">
67         <status value="current"></status>
68         <leaf name="test-leaf-1">
69             <type name="string"></type>
70             <default value="def-val"></default>
71             <config value="true"></config>
72             <mandatory value="false"></mandatory>
73             <status value="current"></status>
74         </leaf>
75         <leaf-list name="test-leaf-list">
76             <type name="string"></type>
77             <config value="false"></config>
78             <ordered-by value="user"></ordered-by>
79             <status value="current"></status>
80         </leaf-list>
81         <list name="test-list">
82             <key value="key-leaf-1 key-leaf-2"></key>
83             <config value="true"></config>
84             <min-elements value="5"></min-elements>
85             <ordered-by value="system"></ordered-by>
86             <status value="current"></status>
87             <leaf name="key-leaf-1">
88                 <type name="string"></type>
89                 <config value="true"></config>
90                 <mandatory value="false"></mandatory>
91                 <status value="current"></status>
92             </leaf>
93             <leaf name="key-leaf-2">
94                 <type name="string"></type>
95                 <config value="true"></config>
96                 <mandatory value="false"></mandatory>
97                 <status value="current"></status>
98             </leaf>
99         </list>
100         <container name="test-container-2">
101             <presence value="false"></presence>
102             <config value="false"></config>
103             <status value="current"></status>
104         </container>
105     </grouping>
106     <grouping name="test-grouping-2">
107         <status value="current"></status>
108         <anyxml name="test-anyxml-2">
109             <config value="false"></config>
110             <mandatory value="false"></mandatory>
111             <status value="current"></status>
112         </anyxml>
113         <choice name="test-choice-2">
114             <config value="false"></config>
115             <mandatory value="false"></mandatory>
116             <status value="current"></status>
117             <case name="first">
118                 <status value="current"></status>
119                 <leaf name="first-case-leaf">
120                     <type name="string">
121                         <length value="10|15">
122                             <error-message>
123                                 <value>The argument is out of bounds &lt;10, 10&gt;</value>
124                             </error-message>
125                             <error-app-tag value="length-out-of-specified-bounds"></error-app-tag>
126                         </length>
127                     </type>
128                     <config value="false"></config>
129                     <mandatory value="false"></mandatory>
130                     <status value="current"></status>
131                 </leaf>
132             </case>
133             <case name="second">
134                 <status value="current"></status>
135                 <leaf name="second-case-leaf">
136                     <type name="int32">
137                         <range value="10|15">
138                             <error-message>
139                                 <value>The argument is out of bounds &lt;10, 10&gt;</value>
140                             </error-message>
141                             <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
142                         </range>
143                     </type>
144                     <config value="false"></config>
145                     <mandatory value="false"></mandatory>
146                     <status value="current"></status>
147                 </leaf>
148             </case>
149         </choice>
150     </grouping>
151     <anyxml name="test-anyxml">
152         <when condition="foo != 'bar'"></when>
153         <must condition="bar != 'foo'"></must>
154         <config value="true"></config>
155         <mandatory value="false"></mandatory>
156         <status value="current"></status>
157         <foo-prefix:test-extension></foo-prefix:test-extension>
158     </anyxml>
159     <leaf name="leafref-target-leaf">
160         <type name="string"></type>
161         <config value="true"></config>
162         <mandatory value="false"></mandatory>
163         <status value="current"></status>
164     </leaf>
165     <container name="test-container-1">
166         <must condition="bar != 'foo'"></must>
167         <presence value="false"></presence>
168         <config value="true"></config>
169         <status value="current"></status>
170     </container>
171     <container name="test-container-3">
172         <presence value="false"></presence>
173         <config value="true"></config>
174         <status value="current"></status>
175         <choice name="test-choice">
176             <config value="true"></config>
177             <mandatory value="false"></mandatory>
178             <status value="current"></status>
179             <case name="a">
180                 <status value="current"></status>
181                 <leaf name="case-a-leaf">
182                     <type name="int32"></type>
183                     <config value="true"></config>
184                     <mandatory value="false"></mandatory>
185                     <status value="current"></status>
186                 </leaf>
187             </case>
188             <case name="b">
189                 <status value="current"></status>
190                 <leaf name="case-b-leaf">
191                     <type name="decimal64">
192                         <fraction-digits value="3"></fraction-digits>
193                         <range value="-9223372036854775.808..9223372036854775.807">
194                             <error-message>
195                                 <value>The argument is out of bounds &lt;-9223372036854775.808, 9223372036854775.807&gt;</value>
196                             </error-message>
197                             <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
198                             <reference>
199                                 <text>https://tools.ietf.org/html/rfc6020#section-9.3.4</text>
200                             </reference>
201                         </range>
202                     </type>
203                     <config value="true"></config>
204                     <mandatory value="false"></mandatory>
205                     <status value="current"></status>
206                 </leaf>
207             </case>
208         </choice>
209         <leaf name="bits-leaf">
210             <type name="bits">
211                 <bit name="one">
212                     <position value="1"></position>
213                     <status value="current"></status>
214                 </bit>
215                 <bit name="two">
216                     <position value="2"></position>
217                     <status value="current"></status>
218                 </bit>
219             </type>
220             <config value="true"></config>
221             <mandatory value="false"></mandatory>
222             <status value="current"></status>
223         </leaf>
224         <leaf name="identityref-leaf">
225             <type name="identityref">
226                 <base name="test-base-identity"></base>
227             </type>
228             <config value="true"></config>
229             <mandatory value="false"></mandatory>
230             <status value="current"></status>
231         </leaf>
232     </container>
233     <augment target-node="/test-container-3/test-choice">
234         <status value="current"></status>
235         <case name="c">
236             <status value="current"></status>
237             <leaf name="case-c-leaf">
238                 <type name="string"></type>
239                 <config value="true"></config>
240                 <mandatory value="false"></mandatory>
241                 <status value="current"></status>
242             </leaf>
243         </case>
244     </augment>
245     <augment target-node="/test-container-1">
246         <status value="current"></status>
247         <uses name="test-grouping-1">
248             <refine target-node="test-list">
249                 <config value="true"></config>
250                 <min-elements value="5"></min-elements>
251             </refine>
252             <refine target-node="test-leaf-list">
253                 <config value="false"></config>
254             </refine>
255             <refine target-node="test-leaf-1">
256                 <default value="def-val"></default>
257                 <config value="true"></config>
258                 <mandatory value="false"></mandatory>
259             </refine>
260             <refine target-node="test-container-2">
261                 <presence value="false"></presence>
262                 <config value="false"></config>
263             </refine>
264             <augment target-node="test-container-2">
265                 <status value="current"></status>
266                 <leaf name="test-leaf-2">
267                     <type name="string"></type>
268                     <config value="true"></config>
269                     <mandatory value="false"></mandatory>
270                     <status value="current"></status>
271                 </leaf>
272             </augment>
273         </uses>
274     </augment>
275     <rpc name="test-rpc">
276         <status value="current"></status>
277         <grouping name="rpc-grouping">
278             <status value="current"></status>
279             <leaf name="rpc-grouping-leaf">
280                 <type name="string"></type>
281                 <config value="true"></config>
282                 <mandatory value="false"></mandatory>
283                 <status value="current"></status>
284             </leaf>
285         </grouping>
286         <input>
287             <leaf name="input-leaf">
288                 <type name="string"></type>
289                 <config value="true"></config>
290                 <mandatory value="false"></mandatory>
291                 <status value="current"></status>
292             </leaf>
293         </input>
294         <output>
295             <leaf name="output-leaf">
296                 <type name="string"></type>
297                 <config value="true"></config>
298                 <mandatory value="false"></mandatory>
299                 <status value="current"></status>
300             </leaf>
301         </output>
302     </rpc>
303     <notification name="test-notification">
304         <status value="current"></status>
305         <uses name="test-grouping-2">
306             <refine target-node="test-choice-2">
307                 <config value="false"></config>
308                 <mandatory value="false"></mandatory>
309             </refine>
310             <refine target-node="test-anyxml-2">
311                 <config value="false"></config>
312                 <mandatory value="false"></mandatory>
313             </refine>
314         </uses>
315     </notification>
316 </module>