Finished yang generation for match, action, instruction and tableFeatureProperties
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-augments.yang
1 module openflow-augments {\r
2     namespace "urn:opendaylight:openflow:augments";\r
3     prefix "aug";\r
4 \r
5     import ietf-inet-types {prefix inet;}\r
6     import ietf-yang-types {prefix yang;}\r
7     \r
8     import openflow-types {prefix oft;}\r
9     import openflow-protocol {prefix ofproto;}\r
10     import openflow-action {prefix ofaction;}\r
11     import openflow-instruction {prefix ofinstruction;}\r
12     import openflow-extensible-match {prefix oxm;}\r
13 \r
14 \r
15     revision "2013-10-02" {\r
16         description "Initial model";\r
17     }\r
18 // OFP_MATCH AUGMENTS\r
19      augment "/oxm:oxm-container/oxm:match-entries" {\r
20          leaf port-number {\r
21              type uint32;\r
22          }\r
23      }\r
24 \r
25      augment "/oxm:oxm-container/oxm:match-entries" {\r
26          leaf metadata {\r
27              type binary;\r
28          }\r
29      }\r
30      \r
31      augment "/oxm:oxm-container/oxm:match-entries" {\r
32          leaf mask {\r
33              type binary;\r
34          }\r
35      }\r
36      \r
37      augment "/oxm:oxm-container/oxm:match-entries" {\r
38          leaf mac-address {\r
39              type yang:mac-address;\r
40          }\r
41      }\r
42      \r
43      augment "/oxm:oxm-container/oxm:match-entries" {\r
44          leaf eth-type {\r
45              type oft:ether-type;\r
46          }\r
47      }\r
48      \r
49      augment "/oxm:oxm-container/oxm:match-entries" {\r
50          leaf vlan-vid {\r
51              type uint16;\r
52          }\r
53      }\r
54      \r
55      augment "/oxm:oxm-container/oxm:match-entries" {\r
56          leaf vlan-pcp {\r
57              type uint8;\r
58          }\r
59      }\r
60      \r
61      augment "/oxm:oxm-container/oxm:match-entries" {\r
62          leaf dscp {\r
63              type inet:dscp;\r
64          }\r
65      }\r
66      \r
67      augment "/oxm:oxm-container/oxm:match-entries" {\r
68          leaf ecn {\r
69              type uint8;\r
70          }\r
71      }\r
72      \r
73      augment "/oxm:oxm-container/oxm:match-entries" {\r
74          leaf protocol-number {\r
75              type uint8;\r
76          }\r
77      }\r
78      \r
79      augment "/oxm:oxm-container/oxm:match-entries" {\r
80          leaf ipv4-prefix {\r
81              type inet:ipv4-prefix;\r
82          }\r
83      }\r
84      \r
85      augment "/oxm:oxm-container/oxm:match-entries" {\r
86          leaf port {\r
87              type inet:port-number;\r
88          }\r
89      }\r
90      \r
91      augment "/oxm:oxm-container/oxm:match-entries" {\r
92          leaf icmpv4-type {\r
93              type uint8;\r
94          }\r
95      }\r
96      \r
97      augment "/oxm:oxm-container/oxm:match-entries" {\r
98          leaf icmpv4-code {\r
99              type uint8;\r
100          }\r
101      }\r
102      \r
103      augment "/oxm:oxm-container/oxm:match-entries" {\r
104          leaf op-code {\r
105              type uint16;\r
106          }\r
107      }\r
108      \r
109      augment "/oxm:oxm-container/oxm:match-entries" {\r
110          leaf ipv6-prefix {\r
111              type inet:ipv6-prefix;\r
112          }\r
113      }\r
114      \r
115      augment "/oxm:oxm-container/oxm:match-entries" {\r
116          leaf ipv6-flabel {\r
117              type inet:ipv6-flow-label;\r
118          }\r
119      }\r
120      \r
121      augment "/oxm:oxm-container/oxm:match-entries" {\r
122          leaf icmpv6-type {\r
123              type uint8;\r
124          }\r
125      }\r
126      \r
127      augment "/oxm:oxm-container/oxm:match-entries" {\r
128          leaf icmpv6-code {\r
129              type uint8;\r
130          }\r
131      }\r
132      \r
133      augment "/oxm:oxm-container/oxm:match-entries" {\r
134          leaf ipv6-address {\r
135              type inet:ipv6-address;\r
136          }\r
137      }\r
138      \r
139      augment "/oxm:oxm-container/oxm:match-entries" {\r
140          leaf mpls-label {\r
141              type uint32;\r
142          }\r
143      }\r
144      \r
145      augment "/oxm:oxm-container/oxm:match-entries" {\r
146          leaf tc {\r
147              type uint8;\r
148          }\r
149      }\r
150      \r
151      augment "/oxm:oxm-container/oxm:match-entries" {\r
152          leaf bos {\r
153              type boolean;\r
154          }\r
155      }\r
156      \r
157      augment "/oxm:oxm-container/oxm:match-entries" {\r
158          leaf isid {\r
159              type uint32;\r
160          }\r
161      }\r
162      \r
163      augment "/oxm:oxm-container/oxm:match-entries" {\r
164          leaf pseudo-field {\r
165              type bits {\r
166                  bit nonext {\r
167                      description "<No next header> encountered.";\r
168                      position 0;\r
169                  }\r
170                  bit esp {\r
171                      description "Encrypted Sec Payload header present.";\r
172                      position 1;\r
173                  }\r
174                  bit auth {\r
175                      description "Authentication header present.";\r
176                      position 2;\r
177                  }\r
178                  bit dest {\r
179                      description "1 or 2 dest headers present.";\r
180                      position 3;\r
181                  }\r
182                  bit frag {\r
183                      description "Fragment header present.";\r
184                      position 4;\r
185                  }\r
186                  bit router {\r
187                      description "Router header present.";\r
188                      position 5;\r
189                  }\r
190                  bit hop {\r
191                      description "Hop-by-hop header present.";\r
192                      position 6;\r
193                  }\r
194                  bit unrep {\r
195                      description "Unexpected repeats encountered.";\r
196                      position 7;\r
197                  }\r
198                  bit unseq {\r
199                      description "Unexpected sequencing encountered.";\r
200                      position 8;\r
201                      }                    \r
202              }\r
203          }\r
204      }\r
205 \r
206 // OFP_ACTION AUGMENTS\r
207      augment "/ofaction:actions" {\r
208          leaf port {\r
209              type oft:any-port-number;\r
210          }\r
211      }\r
212      \r
213      augment "/ofaction:actions" {\r
214          leaf max-length {\r
215              description "Maximum packet length to be send to controller.";\r
216              type union {\r
217                  type uint16 {\r
218                      range "0..65294"; // 0..0xff0e\r
219                  }\r
220                  type enumeration {\r
221                      enum max {\r
222                          desription\r
223                              "maximum max_len value which can be used\r
224                              to request a specific byte length";\r
225                          value 65509; //0xffe5\r
226                      }\r
227                      enum no-buffer {\r
228                          description \r
229                              "indicates that no buffering should be\r
230                               applied and the whole packet is to be\r
231                               sent to the controller";\r
232                          value 65535; //0xffff\r
233                      }\r
234                  }\r
235              }\r
236          }\r
237      }\r
238      \r
239      augment "/ofaction:actions" {\r
240          leaf mpls-ttl {\r
241              type uint8;\r
242          }\r
243      }\r
244      \r
245      augment "/ofaction:actions" {\r
246          leaf ethertype {\r
247              type oft:ether-type;\r
248          }\r
249      }\r
250      \r
251      augment "/ofaction:actions" {\r
252          leaf queue-id {\r
253              type uint32;\r
254          }\r
255      }\r
256      \r
257      augment "/ofaction:actions" {\r
258          leaf group-id {\r
259              type uint32;\r
260          }\r
261      }\r
262      \r
263      augment "/ofaction:actions" {\r
264          leaf nw-ttl {\r
265              type uint8;\r
266          }\r
267      }\r
268      \r
269      augment "/ofaction:actions" {\r
270          uses oxm:oxm-fields;\r
271      }\r
272      \r
273      augment "/ofaction:actions" {\r
274          leaf experimenter {\r
275              type uint32;\r
276          }\r
277      }\r
278 \r
279 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
280      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
281          list instruction-ids {\r
282              uses ofinstruction:instructions;\r
283          }\r
284      }\r
285 \r
286      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
287          list next-table-ids {\r
288              leaf table-id {\r
289                  type uint8;\r
290              }\r
291          }\r
292      }\r
293 \r
294      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
295          list action-ids {\r
296              uses ofaction:action-header;\r
297          }\r
298      }\r
299 \r
300      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
301          list oxm-ids {\r
302              uses oxm:oxm-fields;\r
303          }\r
304      }\r
305 \r
306      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
307          leaf experimenter {\r
308              type uint32;\r
309          }\r
310          leaf exp-type {\r
311              type uint32;\r
312          }\r
313          leaf data {\r
314              type binary;\r
315          }\r
316      }\r
317      \r
318 // OFP_INSTRUCTION AUGMENTS\r
319      augment "/ofinstruction:instruction" {\r
320          leaf table-id {\r
321              type uint8;\r
322          }\r
323      }\r
324      \r
325      augment "/ofinstruction:instruction" {\r
326          leaf metadata {\r
327              type binary;\r
328          }\r
329          leaf metadata-mask {\r
330              type binary;\r
331          }\r
332      }\r
333      \r
334      augment "/ofinstruction:instruction" {\r
335          list actions {\r
336              uses ofaction:action-header;\r
337          }\r
338      }\r
339      \r
340      augment "/ofinstruction:instruction" {\r
341          leaf meter-id {\r
342              type uint32;\r
343          }\r
344      }\r
345      \r
346      augment "/ofinstruction:instruction" {\r
347          leaf experimenter {\r
348              type uint32;\r
349          }\r
350      }\r
351 }