Add UniqueValidation
[yangtools.git] / yang / yang-data-impl / src / test / resources / yt570.yang
1 module foo {
2     yang-version 1;
3     namespace "foo";
4     prefix foo;
5
6     revision 2016-05-17 {
7         description "test";
8     }
9
10     container task-container {
11         list task {
12             key "task-id";
13             unique "my-leaf-1 my-leaf-2";
14             unique "my-leaf-1 my-container/my-leaf-3";
15
16             leaf task-id {
17                 type string;
18             }
19             leaf my-leaf-1 {
20                 type string;
21             }
22             leaf my-leaf-2 {
23                 type string;
24             }
25             container my-container {
26                 leaf my-leaf-3 {
27                     type string;
28                 }
29             }
30         }
31     }
32
33     list inside-list {
34         list inner {
35             leaf inner-leaf {
36                 type string;
37             }
38         }
39
40         unique "inner/inner-leaf";
41     }
42
43     list cross-list {
44         key "k";
45         leaf k {
46             type string;
47         }
48         list one {
49             key "one";
50             leaf one {
51                 type string;
52             }
53             leaf one-leaf {
54                 type string;
55             }
56         }
57
58         list two {
59             key "two";
60             leaf two {
61                 type string;
62             }
63             leaf two-leaf {
64                 type string;
65             }
66         }
67
68         unique "one/one-leaf two/two-leaf";
69     }
70
71     list nested-list {
72         list one {
73             list two {
74                 leaf two-leaf {
75                     type string;
76                 }
77             }
78         }
79
80         unique "one/two/two-leaf";
81     }
82 }