Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-impl / src / test / resources / rfc7950 / model / bar.yang
1 module bar {
2     yang-version 1.1;
3     namespace "urn:opendaylight.bar";
4     prefix "bar";
5
6     organization "opendaylight";
7     contact "http://www.opendaylight.org/";
8     description "This model define custom type definitions";
9
10     revision "2013-07-03" {
11         reference " WILL BE DEFINED LATER";
12     }
13
14     typedef int32-ext1 {
15         type int32 {
16             range "2..20";
17         }
18     }
19
20     typedef int32-ext2 {
21         type int32-ext1 {
22             range "3..9|11..max";
23         }
24         units "mile";
25         default "11";
26     }
27
28     typedef string-ext1 {
29         type string {
30             pattern "[a-k]*";
31             length "5..11";
32         }
33     }
34
35     typedef string-ext2 {
36         type string-ext1 {
37             length "6..10";
38         }
39     }
40
41     typedef string-ext3 {
42         type string-ext2 {
43             pattern "[b-u]*";
44         }
45     }
46
47     typedef string-ext4 {
48         type string-ext3 {
49             pattern "[e-z]*";
50         }
51     }
52
53     typedef invalid-string-pattern {
54         type string {
55             pattern "[[A-1*-%22!^^}";
56         }
57     }
58
59     typedef multiple-pattern-string {
60         type string {
61             pattern "[[A-1*-%22!^^}";
62             pattern "[e-z]*";
63         }
64     }
65
66     typedef my-decimal-type {
67         type decimal64 {
68             fraction-digits 6;
69         }
70     }
71
72     typedef my-union {
73         type union {
74             type int16 {
75                 range "1..100";
76             }
77             type int32;
78         }
79     }
80
81     typedef my-union-ext {
82         type my-union;
83     }
84
85     typedef nested-union2 {
86         type union {
87             type my-union-ext;
88             type string;
89         }
90     }
91
92     container interfaces {
93         grouping ifEntry {
94             container augment-holder;
95         }
96         list ifEntry {
97             key "ifIndex";
98
99             leaf ifIndex {
100                 type uint32;
101                 units minutes;
102             }
103
104             leaf ifMtu {
105                 type int32;
106             }
107
108             min-elements 1;
109             max-elements 11;
110         }
111     }
112
113     extension opendaylight {
114         argument "name" {
115             yin-element "true";
116         }
117     }
118
119 }