Bug 6022: Deviation statement is not fully available in the YANG parser output
[yangtools.git] / yang / yang-parser-impl / src / test / resources / deviation-stmt-test / foo.yang
1 module foo {
2     namespace "foo-namespace";
3     prefix "foo-prefix";
4
5     revision "2016-06-23" {
6         description "Initial revision";
7     }
8
9     deviation "/test-container/test-leaf" {
10         description "test-leaf is not supported";
11         deviate not-supported;
12     }
13
14     deviation "/test-container/test-leaf-2" {
15         deviate add {
16             default "added-def-val";
17             config false;
18         }
19     }
20
21     deviation "/test-container/test-leaf-list" {
22         deviate add {
23             max-elements 12;
24             mandatory true;
25         }
26
27         deviate replace {
28             min-elements 5;
29             type uint32;
30         }
31
32         deviate delete {
33             must "daytime or time";
34             must "time or daytime";
35             units minutes;
36         }
37     }
38
39     deviation "/test-container/test-list" {
40         deviate delete {
41             unique "list-leaf-1 list-leaf-2";
42             unique "list-leaf-3 list-leaf-4";
43         }
44     }
45
46     container test-container {
47         leaf test-leaf {
48             type string;
49         }
50
51         leaf test-leaf-2 {
52             type string;
53         }
54
55         leaf-list test-leaf-list {
56             type int32;
57             min-elements 3;
58             must "daytime or time";
59             units minutes;
60         }
61
62         list test-list {
63             key key-leaf;
64             unique "list-leaf-1 list-leaf-2";
65             unique "list-leaf-3 list-leaf-4";
66
67             leaf key-leaf {
68                 type string;
69             }
70
71             leaf list-leaf-1 {
72                 type string;
73             }
74
75             leaf list-leaf-2 {
76                 type string;
77             }
78
79             leaf list-leaf-3 {
80                 type string;
81             }
82
83             leaf list-leaf-4 {
84                 type string;
85             }
86         }
87     }
88 }