Fix invalid augmentations
[mdsal.git] / binding / mdsal-binding-test-model / src / main / yang / opendaylight-mdsal-augment-test.yang
1 module opendaylight-mdsal-augment-test {
2
3     namespace "urn:opendaylight:params:xml:ns:yang:mdsal:test:augment";
4     prefix aug-test;
5
6     import opendaylight-mdsal-binding-test {
7         prefix test;
8     }
9     import yang-ext {
10         prefix ext;
11     }
12
13     description
14         "This module contains a collection of YANG augmentations used for
15         some test cases.";
16
17     revision 2014-07-09 {
18         description
19         "Test model for testing data broker with nested lists.";
20     }
21
22     identity third-party {
23         base test:test-root;
24     }
25
26     grouping leaf-from-grouping {
27         leaf leaf-from-grouping {
28             type string;
29         }
30     }
31
32     grouping leaf2-from-grouping {
33         leaf leaf2-from-grouping {
34             type string;
35         }
36     }
37
38     grouping complex-from-grouping {
39         container container-with-uses {
40             uses leaf-from-grouping;
41         }
42         list list-via-uses {
43             key "name";
44             leaf name {
45                 type string;
46             }
47         }
48     }
49
50     augment "/test:top/test:top-level-list" {
51         ext:augment-identifier tree-leaf-only-uses-augment;
52         uses leaf-from-grouping;
53     }
54
55     augment "/test:top/test:top-level-list" {
56         ext:augment-identifier tree-complex-leaves;
57         leaf simple-type {
58             type int32;
59         }
60         leaf identity {
61             type test:test-identityref;
62         }
63         leaf schema-unaware-union {
64             type test:int32-string-union;
65         }
66
67         leaf simple-type-ref {
68             type leafref {
69                 path "../simple-type";
70             }
71         }
72         leaf identity-ref {
73             type leafref {
74                 path "../identity";
75             }
76         }
77         leaf schema-unaware-union-ref {
78             type leafref {
79                 path "../schema-unaware-union";
80             }
81         }
82     }
83
84
85     augment "/test:put-top/test:input/test:top-level-list" {
86         ext:augment-identifier rpc-leaf-only-uses-augment;
87         uses leaf-from-grouping;
88     }
89
90     augment "/test:top/test:top-level-list" {
91         ext:augment-identifier tree-complex-uses-augment;
92         uses complex-from-grouping;
93     }
94
95     augment "/test:put-top/test:input/test:top-level-list" {
96         ext:augment-identifier rpc-complex-uses-augment;
97         uses complex-from-grouping;
98     }
99
100     augment "/test:top/test:top-level-list" {
101         ext:augment-identifier tree-leaf-only-augment;
102
103         leaf simple-value {
104             type string;
105         }
106     }
107
108     augment "/test:top/test:top-level-list" {
109         ext:augment-identifier tree-second-leaf-only-augment;
110
111         leaf second-simple-value {
112             type string;
113         }
114     }
115
116     augment "/test:put-top/test:input/test:top-level-list" {
117         ext:augment-identifier rpc-leaf-only-augment;
118
119         leaf simple-value {
120             type string;
121         }
122     }
123
124     augment "/test:put-top/test:input/test:top-level-list" {
125         ext:augment-identifier rpc-second-leaf-only-augment;
126
127         leaf second-simple-value {
128             type string;
129         }
130     }
131
132     augment "/test:top/test:top-level-list/test:choice-in-list" {
133         case simple-via-uses {
134             uses leaf2-from-grouping;
135         }
136         case empty-leaf {
137             leaf empty-type {
138                 type empty;
139             }
140         }
141     }
142
143     augment "/test:put-top/test:input/test:top-level-list/test:choice-in-list" {
144         case simple-via-uses {
145             uses leaf2-from-grouping;
146         }
147     }
148
149     augment "/test:top/test:choice-list/test:choice-in-choice-list" {
150         case complex-via-uses-with-different-name {
151             uses complex-from-grouping;
152         }
153     }
154
155     augment "/test:put-top/test:input/test:choice-list/test:choice-in-choice-list" {
156         case complex-via-uses {
157             uses complex-from-grouping;
158         }
159     }
160
161     augment "/test:top" {
162         ext:augment-identifier top-choice-augment1;
163         choice augment-choice1 {
164             case case1 {
165                 container case1-container {
166                     leaf case1-leaf {
167                         type string;
168                     }
169                 }
170             }
171
172             case case2 {
173                 container case2-container {
174                     leaf case2-leaf {
175                         type string;
176                     }
177                 }
178             }
179         }
180     }
181
182     augment "/test:top/augment-choice1/case1" {
183         ext:augment-identifier top-choice-augment2;
184         choice augment-choice2 {
185             case case11 {
186                 container case11-choice-case-container {
187                     leaf case11-choice-case-leaf {
188                         type string;
189                     }
190                 }
191             }
192         }
193     }
194
195 }