Fixup checkstyle
[controller.git] / opendaylight / md-sal / sal-test-model / src / main / yang / opendaylight-of-migration-test-model.yang
1 module opendaylight-of-migration-test-model {
2
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:of-migration-test-model";
4     prefix of-migration-test;
5
6     import opendaylight-mdsal-list-test {prefix test;}
7     import yang-ext {prefix ext;}
8     import opendaylight-mdsal-augment-test {prefix aug;}
9     import opendaylight-test-routed-rpc {prefix routed;}
10
11     description
12         "This module contains a collection of YANG definitions used for
13         test cases that used to depend on flow model.";
14
15     revision 2015-02-10 {
16     }
17
18     typedef bit-flags {
19         type bits {
20             bit FLAG_ONE;
21             bit FLAG_TWO;
22             bit FLAG_THREE;
23             bit FLAG_FOUR;
24             bit FLAG_FIVE;
25         }
26     }
27
28     typedef custom-enum {
29         type enumeration {
30             enum type1;
31             enum type2;
32             enum type3;
33         }
34     }
35
36     grouping enum-grouping {
37         leaf attr-enum {
38             type custom-enum;
39         }
40     }
41
42     grouping aug-grouping {
43         container cont1 {
44             leaf attr-str {
45                 type string;
46             }
47         }
48
49         container cont2 {
50             list contlist1 {
51                 key "attr-str";
52
53                 leaf attr-str {
54                     type string;
55                 }
56
57                 uses enum-grouping;
58             }
59         }
60
61         leaf attr-str1 {
62             type string;
63         }
64
65         leaf attr-str2 {
66             type string;
67         }
68
69         leaf attr-str3 {
70             type string;
71         }
72
73         leaf attr-str4 {
74             type string;
75         }
76
77         list list1 {
78             key "attr-str";
79             leaf attr-str {
80                 type string;
81             }
82
83             list list1-1 {
84                 key "attr-int";
85                 leaf attr-int {
86                     type int32;
87                 }
88
89                 leaf attr-str {
90                     type string;
91                 }
92
93                 leaf flags {
94                     type bit-flags;
95                 }
96             }
97
98             list list1-2 {
99                 key "attr-int";
100                 leaf attr-int {
101                     type int32;
102                 }
103
104                 leaf attr-str {
105                     type string;
106                 }
107             }
108         }
109     }
110
111     augment "/test:top/test:top-level-list" {
112         ext:augment-identifier tll-complex-augment;
113         uses aug-grouping;
114     }
115
116     augment "/test:top/test:top-level-list/list1/list1-1"  {
117         ext:augment-identifier list11-simple-augment;
118
119         leaf attr-str2 {
120             type string;
121         }
122
123         container cont {
124             leaf attr-int {
125                 type int32;
126             }
127         }
128     }
129
130     augment "/test:top/test:top-level-list/test:nested-list/"  {
131         ext:augment-identifier nested-list-simple-augment;
132
133         leaf type {
134             type string;
135         }
136     }
137
138     rpc knock-knock {
139         input {
140             leaf knocker-id {
141                 ext:context-reference routed:test-context;
142                 type instance-identifier;
143             }
144
145             leaf question {
146                 type string;
147             }
148         }
149
150         output {
151             leaf answer {
152                 type string;
153             }
154         }
155     }
156 }