Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-impl / src / test / resources / constraint-definitions-test / foo.yang
1 module foo {
2     namespace foo-namespace;
3     prefix foo-prefix;
4
5     revision 2016-09-20;
6
7     leaf mandatory-leaf-1 {
8         type int32;
9         mandatory true;
10         when "foo = 'bar'";
11         must "bar != 'foo'";
12     }
13
14     leaf mandatory-leaf-2 {
15         type int32;
16         mandatory true;
17         when "foo = 'bar'";
18         must "bar != 'foo'";
19     }
20
21     leaf mandatory-leaf-3 {
22         type int32;
23         mandatory false;
24         when "foo = 'bar'";
25         must "bar != 'foo'";
26     }
27
28     leaf mandatory-leaf-4 {
29         type int32;
30         mandatory false;
31         when "foo = 'baz'";
32         must "bar != 'foo'";
33     }
34
35     leaf mandatory-leaf-5 {
36         type int32;
37         mandatory false;
38         when "foo = 'baz'";
39         must "baz != 'foo'";
40     }
41
42     leaf-list constrained-leaf-list-1 {
43         type int32;
44         when "foo = 'bar'";
45         must "bar != 'foo'";
46         min-elements 10;
47         max-elements 100;
48     }
49
50     leaf-list constrained-leaf-list-2 {
51         type int32;
52         when "foo = 'bar'";
53         must "bar != 'foo'";
54         min-elements 10;
55         max-elements 100;
56     }
57
58     leaf-list constrained-leaf-list-3 {
59         type int32;
60         when "foo = 'bar'";
61         must "bar != 'foo'";
62         min-elements 50;
63         max-elements 500;
64     }
65
66     leaf-list constrained-leaf-list-4 {
67         type int32;
68         when "foo = 'bar'";
69         must "bar != 'foo'";
70         min-elements 50;
71         max-elements 100;
72     }
73 }