Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / rfc7950 / list-keys-test / correct-list-keys-test.yang
1 module correct-list-keys-test {
2     yang-version 1;
3     namespace "correct-list-keys-test";
4     prefix "test";
5
6     feature feature-b;
7     feature feature-d;
8
9     list valid-list-a {
10         leaf a1 {
11             type string;
12         }
13         leaf a2 {
14             when "../a1 = 'key-a1'";
15             type int32;
16         }
17         key "a1 test:a2";
18     }
19
20     list valid-list-b {
21         key "b";
22         leaf b {
23             if-feature feature-b;
24             type string;
25         }
26     }
27
28     grouping d {
29         leaf d1 {
30             type int32;
31             if-feature feature-d;
32         }
33         leaf d2 {
34             when "../d1 = '2'";
35             type string;
36         }
37     }
38
39     list valid-list-d1 {
40         key d1;
41         uses d;
42     }
43
44     list valid-list-d2 {
45         key test:d2;
46         uses d;
47     }
48 }