Unit test and decode implementation
[ccsdk/sli/plugins.git] / restconf-client / provider / src / test / resources / yang / test-yang.yang
1 module test-yang {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:test";
4     prefix "hello";
5
6     revision "2015-01-05" {
7         description "Initial revision of hello model";
8     }
9
10     container cont1 {
11         container cont2 {
12             container cont3 {
13                 leaf leaf10 {
14                     type string;
15                 }
16             }
17             list list1 {
18                 key "leaf1 leaf2";
19                 leaf leaf1 {
20                     type string;
21                 }
22                 leaf leaf2 {
23                     type string;
24                 }
25                 leaf leaf3 {
26                     type string;
27                 }
28                 leaf-list ll1 {
29                     type string;
30                 }
31                 leaf-list ll2 {
32                     type string;
33                 }
34                 container cont4 {
35                     leaf leaf11 {
36                         type string;
37                     }
38                 }
39                 list list4 {
40                     leaf leaf8 {
41                         type string;
42                     }
43                 }
44                 list list5 {
45                     leaf leaf9 {
46                         type string;
47                     }
48                 }
49             }
50             list list2 {
51                 leaf leaf4 {
52                     type string;
53                 }
54             }
55             leaf leaf5 {
56                 type string;
57             }
58             leaf leaf6 {
59                 type string;
60             }
61             leaf-list ll3 {
62                 type string;
63             }
64             leaf-list ll4 {
65                 type string;
66             }
67         }
68     }
69
70     augment "/cont1/cont2" {
71         container cont4 {
72             leaf leaf10 {
73                type string;
74             }
75         }
76         list list6 {
77            leaf leaf11 {
78               type string;
79            }
80         }
81         leaf leaf12 {
82             type string;
83         }
84         leaf-list ll5 {
85             type string;
86         }
87     }
88
89     choice ch1 {
90        case c1 {
91            container cont8 {
92            container cont6 {
93               leaf leaf16 {
94                   type string;
95               }
96            }
97            list list8 {
98               leaf leaf18 {
99                   type string;
100               }
101            }
102            leaf leaf19 {
103                type string;
104            }
105            leaf-list ll7 {
106                type string;
107            }
108            }
109        }
110        case c2 {
111            container cont9 {
112            leaf leaf20 {
113               type string;
114            }
115            leaf-list ll8 {
116               type string;
117            }
118            container cont11 {
119               choice ch3 {
120                   case c1 {
121                      leaf leaf25 {
122                         type string;
123                      }
124                      uses g1;
125                   }
126               }
127            }
128            }
129        }
130     }
131
132     grouping g1 {
133     container cont13 {
134         container cont12 {
135            leaf leaf26 {
136               type string;
137            }
138         }
139         list list9 {
140            leaf leaf27 {
141               type string;
142            }
143         }
144         leaf leaf28 {
145            type string;
146         }
147         leaf-list ll9 {
148            type string;
149         }
150         }
151     }
152
153     uses g1;
154
155     rpc create-sfc {
156         input {
157             container cont14 {
158                 leaf leaf28 {
159                     type string;
160                 }
161             }
162             list list10 {
163                 leaf leaf29 {
164                     type string;
165                 }
166             }
167             leaf leaf30 {
168                 type string;
169             }
170             leaf-list ll10 {
171                 type string;
172             }
173             choice ch3 {
174                 case c1 {
175                     container cont15 {
176                         leaf leaf31 {
177                             type string;
178                         }
179                     }
180                 }
181             }
182             uses g1;
183         }
184         output {
185             container cont16 {
186                 leaf leaf32 {
187                     type string;
188                 }
189             }
190             list list11 {
191                 leaf leaf33 {
192                     type string;
193                 }
194             }
195             leaf leaf34 {
196                 type string;
197             }
198             leaf-list ll11 {
199                 type string;
200             }
201             choice ch4 {
202                 case c1 {
203                     container cont17 {
204                         leaf leaf35 {
205                             type string;
206                         }
207                     }
208                 }
209             }
210             uses g1;
211         }
212     }
213
214     container cont18 {
215       container cont18 {
216           list list12 {
217               list list12 {
218                   leaf leaf36 {
219                       type string;
220                   }
221               }
222               leaf leaf36 {
223                   type string;
224               }
225           }
226       }
227       leaf leaf40 {
228          type string;
229       }
230     }
231 }