BUG-8085: create missing parent augmentation node
[netconf.git] / netconf / mdsal-netconf-connector / src / test / resources / yang / mdsal-netconf-mapping-test.yang
1 module config {
2     yang-version 1;
3     namespace "urn:opendaylight:mdsal:mapping:test";
4     prefix "map";
5
6     revision "2015-02-26";
7
8     identity foo {
9             description "dummy identity";
10     }
11     container mapping-nodes {
12
13         list multiple-keys {
14             key "key3 key1 key2";
15
16             leaf value1 {
17                 type string;
18             }
19
20             leaf key1 {
21                 type string;
22             }
23
24             leaf value2 {
25                 type string;
26             }
27
28             leaf key2 {
29                 type string;
30             }
31
32             leaf key3 {
33                 type string;
34             }
35         }
36         
37         list mapping-node {
38             key "id";
39             leaf id {
40                 type string;
41             }
42
43             leaf content {
44                 type string;
45             }
46
47             choice ordered-choice {
48                 case a {
49                     container ordered-items {
50                         list ordered-item {
51                             key "id";
52                             ordered-by user;
53                             leaf id {
54                                 type string;
55                             }
56
57                             leaf content {
58                                 type string;
59                             }
60                         }
61                     }
62                 }
63                 case b {
64                     container augmented-ordered-items {
65
66                     }
67                 }
68             }
69         }
70     }
71
72     augment "/map:mapping-nodes/map:mapping-node/map:ordered-choice/map:b/map:augmented-ordered-items" {
73         list augmented-ordered-item {
74             key "id";
75             ordered-by user;
76             leaf id {
77                 type string;
78             }
79
80             leaf content {
81                 type string;
82             }
83         }
84     }
85
86     container top {
87
88         container users {
89
90             list user {
91
92                 key "name";
93
94                 leaf name {
95                     type string;
96                 }
97
98                 leaf type {
99                     type string;
100                 }
101
102                 leaf full-name {
103                     type string;
104                 }
105
106                 container company-info {
107
108                     leaf dept {
109                         type string;
110                     }
111
112                     leaf id {
113                         type string;
114                     }
115                 }
116             }
117         }
118
119         container modules {
120
121             list module {
122
123                 key "id";
124
125                 leaf id {
126                     type string;
127                 }
128
129                 leaf type {
130                     type string;
131                 }
132
133                 leaf desc {
134                     type string;
135                 }
136             }
137         }
138
139         choice choice-node {
140             case a {
141                 leaf text {
142                     type string;
143                 }
144             }
145
146             case b {
147                 container text-cont {
148                     leaf text {
149                         type string;
150                     }
151                 }
152             }
153         }
154
155     } //top
156
157     augment "/map:top/map:choice-node" {
158         case c {
159             leaf augmented-case {
160                 type string;
161             }
162         }
163
164         case d {
165             container choice-wrapper {
166                 choice inner-choice {
167                     case ia {
168                         leaf text {
169                             type string;
170                         }
171                     }
172
173                     case ib {
174                         leaf text2 {
175                             type string;
176                         }
177                     }
178                 }
179             }
180         }
181     }
182
183     augment "/map:top/map:modules/" {
184         container augmented-container {
185             leaf identifier {
186                 type string;
187             }
188         }
189     }
190
191     augment "/map:top/map:modules/" {
192         leaf leaf-from-augment {
193             type string;
194         }
195     }
196
197     augment "/map:top" {
198         container mid-level {
199             container low-level {
200                 container lowest-level {
201                     leaf-list note {
202                         type string;
203                     }
204                 }
205             }
206             container low-level2 {
207                 leaf-list note {
208                     type string;
209                 }
210             }
211         }
212     }
213 }