Bug 8307: Add the option for activating deviation statements
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / test / resources / yang-template / yang-template-test.yang
1 module yang-template-test {
2     yang-version 1.1;
3     namespace "org.opendaylight.yang.template";
4     prefix "ytemp";
5
6     import yang-template-import { prefix "yti"; revision-date 2016-06-23; }
7
8     revision 2016-01-01 {
9         description "Simple yang missing deviation statement";
10     }
11
12     typedef simple-typedef {
13         type string;
14         default "simple-typedef";
15     }
16
17     deviation /yti:yti-leaf {
18         deviate add {
19             default "def";
20         }
21     }
22
23     container simple-container {
24     }
25
26     anyxml simple-anyxml-mandatory {
27         mandatory true;
28     }
29
30     anydata simple-anydata;
31
32     anydata simple-anydata-mandatory {
33         mandatory true;
34     }
35
36     container simple-container-with-action {
37         action act {
38             input {
39                 leaf reset-at {
40                     type string;
41                     mandatory true;
42                 }
43             }
44             output {
45                 leaf reset-finished-at {
46                     type string;
47                     mandatory true;
48                 }
49             }
50         }
51     }
52
53     leaf simple-leaf {
54         type string;
55     }
56
57     leaf-list simple-leaf-list {
58         type string;
59     }
60
61     leaf-list simple-leaf-list-userordered {
62         ordered-by user;
63         type string;
64     }
65
66     list simple-list {
67         key "simple-list-leaf-1";
68         unique "simple-list-leaf-2";
69         leaf simple-list-leaf-1 {
70             type string;
71         }
72         leaf simple-list-leaf-2 {
73             type string;
74         }
75     }
76
77     list simple-list-more-arg-in-unique {
78         key "simple-list-leaf-1";
79         unique "simple-list-leaf-1 simple-list-leaf-2";
80         leaf simple-list-leaf-1 {
81             type string;
82         }
83         leaf simple-list-leaf-2 {
84             type string;
85         }
86     }
87
88     list simple-list-userordered {
89         ordered-by user;
90         key "simple-list-userordered-leaf-1";
91         unique "simple-list-userordered-leaf-2";
92         leaf simple-list-userordered-leaf-1 {
93             type string;
94         }
95         leaf simple-list-userordered-leaf-2 {
96             type string;
97         }
98     }
99
100     choice simple-choice {
101         case simple-case-1 {
102             leaf simple-case-1-leaf {
103                 type string;
104             }
105         }
106         case simple-case-2 {
107             leaf simple-case-2-leaf {
108                 type string;
109             }
110         }
111     }
112
113     anyxml simple-anyxml;
114
115     container simple-container-uses {
116         uses simple-grouping {
117             refine simple-grouping-leaf {
118                 description "refined simple-grouping-leaf description";
119             }
120         }
121     }
122
123     grouping simple-grouping {
124         leaf simple-grouping-leaf {
125             description "simple-grouping-leaf description";
126             type string;
127         }
128     }
129
130     augment "/simple-container-uses" {
131         leaf augment-leaf {
132             type string;
133         }
134     }
135
136     extension simple-extension {
137         description "simple-extension";
138         argument simple-extension-argument;
139     }
140
141     feature simple-feature {
142         description "simple-feature definex if device has some feature... hdd";
143     }
144
145     identity simple-identity {
146         description "simple-identity";
147     }
148
149     notification simple-notification {
150         leaf notification-leaf {
151             type string;
152         }
153     }
154
155     rpc simple-rpc {
156         input {
157             leaf rpc-input-leaf {
158                 type string;
159             }
160         }
161     }
162 }