Merge branch 'blueprint' from controller
[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 complex-from-grouping {
33         container container-with-uses {
34             uses leaf-from-grouping;
35         }
36         list list-via-uses {
37             key "name";
38             leaf name {
39                 type string;
40             }
41         }
42     }
43
44     augment "/test:top/test:top-level-list" {
45         ext:augment-identifier tree-leaf-only-uses-augment;
46         uses leaf-from-grouping;
47     }
48
49     augment "/test:top/test:top-level-list" {
50         ext:augment-identifier tree-complex-leaves;
51         leaf simple-type {
52             type int32;
53         }
54         leaf identity {
55             type test:test-identityref;
56         }
57         leaf schema-unaware-union {
58             type test:int32-string-union;
59         }
60
61         leaf simple-type-ref {
62             type leafref {
63                 path "../simple-type";
64             }
65         }
66         leaf identity-ref {
67             type leafref {
68                 path "../identity";
69             }
70         }
71         leaf schema-unaware-union-ref {
72             type leafref {
73                 path "../schema-unaware-union";
74             }
75         }
76     }
77
78
79     augment "/test:put-top/test:input/test:top-level-list" {
80         ext:augment-identifier rpc-leaf-only-uses-augment;
81         uses leaf-from-grouping;
82     }
83
84     augment "/test:top/test:top-level-list" {
85         ext:augment-identifier tree-complex-uses-augment;
86         uses complex-from-grouping;
87     }
88
89     augment "/test:put-top/test:input/test:top-level-list" {
90         ext:augment-identifier rpc-complex-uses-augment;
91         uses complex-from-grouping;
92     }
93
94     augment "/test:top/test:top-level-list" {
95         ext:augment-identifier tree-leaf-only-augment;
96
97         leaf simple-value {
98             type string;
99         }
100     }
101
102     augment "/test:top/test:top-level-list" {
103         ext:augment-identifier tree-second-leaf-only-augment;
104
105         leaf second-simple-value {
106             type string;
107         }
108     }
109
110     augment "/test:put-top/test:input/test:top-level-list" {
111         ext:augment-identifier rpc-leaf-only-augment;
112
113         leaf simple-value {
114             type string;
115         }
116     }
117
118     augment "/test:put-top/test:input/test:top-level-list" {
119         ext:augment-identifier rpc-second-leaf-only-augment;
120
121         leaf second-simple-value {
122             type string;
123         }
124     }
125
126     augment "/test:top/test:top-level-list/test:choice-in-list" {
127         case simple-via-uses {
128             uses leaf-from-grouping;
129         }
130         case empty-leaf {
131             leaf empty-type {
132                 type empty;
133             }
134         }
135     }
136
137     augment "/test:put-top/test:input/test:top-level-list/test:choice-in-list" {
138         case simple-via-uses {
139             uses leaf-from-grouping;
140         }
141     }
142
143     augment "/test:top/test:choice-list/test:choice-in-choice-list" {
144         case complex-via-uses-with-different-name {
145             uses complex-from-grouping;
146         }
147     }
148
149     augment "/test:put-top/test:input/test:choice-list/test:choice-in-choice-list" {
150         case complex-via-uses {
151             uses complex-from-grouping;
152         }
153     }
154
155     augment "/test:top" {
156         ext:augment-identifier top-choice-augment1;
157         choice augment-choice1 {
158             case case1 {
159                 container case1-container {
160                     leaf case1-leaf {
161                         type string;
162                     }
163                 }
164             }
165
166             case case2 {
167                 container case2-container {
168                     leaf case2-leaf {
169                         type string;
170                     }
171                 }
172             }
173         }
174     }
175
176     augment "/test:top/augment-choice1/case1" {
177         ext:augment-identifier top-choice-augment2;
178         choice augment-choice2 {
179             case case11 {
180                 container case11-choice-case-container {
181                     leaf case11-choice-case-leaf {
182                         type string;
183                     }
184                 }
185             }
186         }
187     }
188
189 }