Moved binding MD-SAL APIs to binding folder
[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 complex-via-uses {
131             uses complex-from-grouping;
132         }
133         case empty-leaf {
134             leaf empty-type {
135                 type empty;
136             }
137         }
138     }
139
140     augment "/test:put-top/test:input/test:top-level-list/test:choice-in-list" {
141         case simple-via-uses {
142             uses leaf-from-grouping;
143         }
144         case complex-via-uses-with-different-name {
145             uses complex-from-grouping;
146         }
147     }
148
149     augment "/test:top" {
150         ext:augment-identifier top-choice-augment1;
151         choice augment-choice1 {
152             case case1 {
153                 container case1-container {
154                     leaf case1-leaf {
155                         type string;
156                     }
157                 }
158             }
159
160             case case2 {
161                 container case2-container {
162                     leaf case2-leaf {
163                         type string;
164                     }
165                 }
166             }
167         }
168     }
169
170     augment "/test:top/augment-choice1/case1" {
171         ext:augment-identifier top-choice-augment2;
172         choice augment-choice2 {
173             case case11 {
174                 container case11-choice-case-container {
175                     leaf case11-choice-case-leaf {
176                         type string;
177                     }
178                 }
179             }
180         }
181     }
182
183 }