1d662522549edf3195d04acc56231f99b47d03e5
[smo/teiv.git] /
1 module general-syntax-test-various {
2
3     namespace "test:general-syntax-test-various";
4     prefix this;
5
6         description
7         "Copyright (C) 2024 Ericsson
8         Modifications Copyright (C) 2024 OpenInfra Foundation Europe";
9
10     revision "2020-07-22" {
11         description "Initial revision";
12     }
13
14         // - - - - enums - - - - -
15
16         container cont1 {
17                 leaf leaf1 {
18                         type enumeration {
19                                 enum zero {
20                                         value 0;
21                                 }
22                                 enum one {
23                                         status deprecated;
24                                 }
25                                 enum two;
26
27                                 enum "thr ee";          // Whitespace
28
29                                 enum "fo.ur";           // OK
30
31                                 enum "fi/ve";           // Weird characters
32
33                                 enum six {
34                                         value;                  // Omitted value
35                                 }
36
37                                 enum seven {
38                                         value "Hello!"; // not numeric
39                                 }
40                         }
41                 }
42         }
43
44         // - - - - status - - - - -
45
46     container cont2 {
47
48         leaf leaf11 {
49                 type string;
50                 status current;
51         }
52
53         leaf leaf12 {
54                 type string;
55                 status deprecated;
56         }
57
58         leaf leaf13 {
59                 type string;
60                 status obsolete;
61         }
62
63         leaf leaf14 {
64                 type string;
65                 status blurb;
66         }
67
68         leaf leaf15 {
69                 type string;
70                 status;
71         }
72     }
73
74     // - - - - - container - - - - -
75
76     container cont3 {
77
78         grouping grouping1 {
79                 leaf leaf21 {
80                         type uint16;
81                 }
82         }
83
84         typedef typedef1 {
85                 type boolean;
86         }
87
88         leaf leaf22 {
89                 type uint16;
90         }
91
92         leaf leaf23 {
93                 type uint16;
94         }
95
96         choice choice1 {
97                 case case1 {
98                         leaf leaf24 {
99                                 type string;
100                         }
101                 }
102                 case case2 {
103                         leaf leaf25 {
104                                 type string;
105                         }
106                 }
107         }
108
109         list list1 {
110                 key "name";
111                 leaf name {
112                         type string;
113                 }
114         }
115
116         notification notification1 {
117                         leaf leaf26 {
118                                 type string;
119                         }
120         }
121
122         leaf-list leaflist1 {
123                 type uint32;
124         }
125
126         anydata anydata1;
127         anydata anydata2;
128
129                 anyxml anyxml1;
130                 anyxml anyxml2;
131                 anyxml anyxml3;
132     }
133
134     // - - - - - choice and case - - - - -
135
136     choice choice1 {
137                 when "../cont3";
138                 status deprecated;
139
140                 config true;
141                 default case2;
142
143         leaf leaf27 {
144                 type uint16;
145         }
146
147         leaf leaf28 {
148                 type uint16;
149         }
150
151         list list4 {
152                 key "name";
153                 leaf name {
154                         type string;
155                 }
156         }
157
158         leaf-list leaflist1 {
159                 type uint32;
160         }
161
162         anydata anydata1;
163                 anyxml anyxml1;
164                 anyxml anyxml2;
165
166                 case case2 {
167                         when "../cont2";
168                         status obsolete;
169
170                         leaf leaf29 {
171                                 type string;
172                         }
173
174                         leaf-list leaflist3 {
175                                 type int32;
176                         }
177
178                         anydata anydata1;
179
180                         anyxml anyxml1;
181                         anyxml anyxml2;
182                 }
183     }
184
185     // - - - - - list - - - - -
186
187     list list4 {
188
189         key leaf22;
190         config true;
191         ordered-by system;
192         status current;
193
194         grouping grouping1 {
195                 leaf leaf21 {
196                         type uint16;
197                 }
198         }
199
200         typedef typedef1 {
201                 type boolean;
202         }
203
204         action action1;
205         action action2;
206         action action3;
207
208         leaf leaf22 {
209                 type uint16;
210         }
211
212         leaf leaf23 {
213                 type uint16;
214         }
215
216         choice choice1 {
217                 case case1 {
218                         leaf leaf24 {
219                                 type string;
220                         }
221                 }
222                 case case2 {
223                         leaf leaf25 {
224                                 type string;
225                         }
226                 }
227         }
228
229         list list1 {
230                 key "name";
231                 leaf name {
232                         type string;
233                 }
234         }
235
236         notification notification1 {
237                         leaf leaf26 {
238                                 type string;
239                         }
240         }
241
242         leaf-list leaflist1 {
243                 type uint32;
244         }
245
246         anydata anydata1;
247         anydata anydata2;
248
249                 anyxml anyxml1;
250                 anyxml anyxml2;
251                 anyxml anyxml3;
252     }
253
254     // - - - - - leaf-list - - - - -
255
256         container cont5 {
257
258                 leaf-list leaflist51 {
259                         type string;
260                         ordered-by user;
261                 }
262
263                 leaf-list leaflist52 {
264                         type string;
265                         ordered-by system;
266                 }
267
268                 leaf-list leaflist53 {
269                         type string;
270                         ordered-by something-else;
271                 }
272
273                 leaf-list leaflist54 {
274                         type string;
275                         ordered-by;
276                 }
277         }
278 }