2c30d4ae7f38fdcebf9cf47bda42fc5c0bf792a8
[smo/teiv.git] /
1 module missing-and-duplicate-statements {
2         yang-version 1.0;
3
4         namespace "test:missing-and-duplicate-statements";
5
6         prefix "this";
7
8         description
9         "Copyright (C) 2024 Ericsson
10         Modifications Copyright (C) 2024 OpenInfra Foundation Europe";
11
12         revision "2019-09-27";
13
14         container cont1 {
15                 presence "first presence";
16                 presence "second presence";             // Wrong
17
18                 leaf leaf1 {
19                         type string;
20                         type uint16;                    // Wrong
21                         mandatory yes;                  // Wrong (doh!)
22                 }
23
24                 leaf leaf2 {
25                         type identityref {
26                                 base this:weird_%%_characters;
27                         }
28                 }
29
30                 leaf leaf3 {
31                         type string;
32                         mandatory;
33                 }
34         }
35
36         container cont2_with_weird_%%_characters;
37
38         container cont3 {
39                 container;                      // Wrong
40                 container "";           // Wrong
41         }
42
43         deviation /this:cont1;                  // Wrong, missing 'deviate'
44 }