Created experimenter subtype for vendor's actions
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-augments.yang
1 /*\r
2  * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8  \r
9  module openflow-augments {\r
10     namespace "urn:opendaylight:openflow:augments";\r
11     prefix "aug";\r
12     \r
13     import yang-ext {prefix ext;}\r
14     import ietf-inet-types {prefix inet;}\r
15     import ietf-yang-types {prefix yang;}\r
16 \r
17     import openflow-types {prefix oft;}\r
18     import openflow-protocol {prefix ofproto;}\r
19     import openflow-action {prefix ofaction;}\r
20     import openflow-instruction {prefix ofinstruction;}\r
21     import openflow-extensible-match {prefix oxm;}\r
22 \r
23     revision "2013-10-02" {\r
24         description "OpenFlow 1.3 - augments model. \r
25                     Please visit \r
26                     https://wiki.opendaylight.org/view/File:OpenFlow_Protocol_Library_-_Project_documentation.pdf\r
27                      - Augmentation Tables chapter";\r
28     }\r
29 \r
30 // OFP_MATCH AUGMENTS\r
31      augment "/oxm:oxm-container/oxm:match-entries" {\r
32          ext:augment-identifier "port-number-match-entry";\r
33          leaf port-number {\r
34              type oft:port-number;\r
35          }\r
36      }\r
37      augment "/oxm:oxm-container/oxm:match-entries" {\r
38          ext:augment-identifier "metadata-match-entry";\r
39          leaf metadata {\r
40              type binary;\r
41          }\r
42      }\r
43      augment "/oxm:oxm-container/oxm:match-entries" {\r
44          ext:augment-identifier "mask-match-entry";\r
45          leaf mask {\r
46              type binary;\r
47          }\r
48      }\r
49      augment "/oxm:oxm-container/oxm:match-entries" {\r
50          ext:augment-identifier "mac-address-match-entry";\r
51          leaf mac-address {\r
52              type yang:mac-address;\r
53          }\r
54      }\r
55      augment "/oxm:oxm-container/oxm:match-entries" {\r
56          ext:augment-identifier "eth-type-match-entry";\r
57          leaf eth-type {\r
58              type oft:ether-type;\r
59          }\r
60      }\r
61      augment "/oxm:oxm-container/oxm:match-entries" {\r
62          ext:augment-identifier "vlan-vid-match-entry";\r
63          leaf vlan-vid {\r
64              type uint16;\r
65          }\r
66          leaf cfi-bit {\r
67              type boolean;\r
68          }\r
69      }\r
70      augment "/oxm:oxm-container/oxm:match-entries" {\r
71          ext:augment-identifier "vlan-pcp-match-entry";\r
72          leaf vlan-pcp {\r
73              type uint8;\r
74          }\r
75      }\r
76      augment "/oxm:oxm-container/oxm:match-entries" {\r
77          ext:augment-identifier "dscp-match-entry";\r
78          leaf dscp {\r
79              type inet:dscp;\r
80          }\r
81      }\r
82      augment "/oxm:oxm-container/oxm:match-entries" {\r
83          ext:augment-identifier "ecn-match-entry";\r
84          leaf ecn {\r
85              type uint8;\r
86          }\r
87      }\r
88      augment "/oxm:oxm-container/oxm:match-entries" {\r
89          ext:augment-identifier "protocol-number-match-entry";\r
90          leaf protocol-number {\r
91              type uint8;\r
92          }\r
93      }\r
94      augment "/oxm:oxm-container/oxm:match-entries" {\r
95          ext:augment-identifier "port-match-entry";\r
96          leaf port {\r
97              type inet:port-number;\r
98          }\r
99      }\r
100      augment "/oxm:oxm-container/oxm:match-entries" {\r
101          ext:augment-identifier "icmpv4-type-match-entry";\r
102          leaf icmpv4-type {\r
103              type uint8;\r
104          }\r
105      }\r
106      augment "/oxm:oxm-container/oxm:match-entries" {\r
107          ext:augment-identifier "icmpv4-code-match-entry";\r
108          leaf icmpv4-code {\r
109              type uint8;\r
110          }\r
111      }\r
112      augment "/oxm:oxm-container/oxm:match-entries" {\r
113          ext:augment-identifier "op-code-match-entry";\r
114          leaf op-code {\r
115              type uint16;\r
116          }\r
117      }\r
118      augment "/oxm:oxm-container/oxm:match-entries" {\r
119          ext:augment-identifier "ipv6-flabel-match-entry";\r
120          leaf ipv6-flabel {\r
121              type inet:ipv6-flow-label;\r
122          }\r
123      }\r
124      augment "/oxm:oxm-container/oxm:match-entries" {\r
125          ext:augment-identifier "icmpv6-type-match-entry";\r
126          leaf icmpv6-type {\r
127              type uint8;\r
128          }\r
129      }\r
130      augment "/oxm:oxm-container/oxm:match-entries" {\r
131          ext:augment-identifier "icmpv6-code-match-entry";\r
132          leaf icmpv6-code {\r
133              type uint8;\r
134          }\r
135      }\r
136      augment "/oxm:oxm-container/oxm:match-entries" {\r
137          ext:augment-identifier "ipv6-address-match-entry";\r
138          leaf ipv6-address {\r
139              type inet:ipv6-address;\r
140          }\r
141      }\r
142      augment "/oxm:oxm-container/oxm:match-entries" {\r
143          ext:augment-identifier "ipv4-address-match-entry";\r
144          leaf ipv4-address {\r
145              type inet:ipv4-address;\r
146          }\r
147      }\r
148      augment "/oxm:oxm-container/oxm:match-entries" {\r
149          ext:augment-identifier "mpls-label-match-entry";\r
150          leaf mpls-label {\r
151              type uint32;\r
152          }\r
153      }\r
154      augment "/oxm:oxm-container/oxm:match-entries" {\r
155          ext:augment-identifier "tc-match-entry";\r
156          leaf tc {\r
157              type uint8;\r
158          }\r
159      }\r
160      augment "/oxm:oxm-container/oxm:match-entries" {\r
161          ext:augment-identifier "bos-match-entry";\r
162          leaf bos {\r
163              type boolean;\r
164          }\r
165      }\r
166      augment "/oxm:oxm-container/oxm:match-entries" {\r
167          ext:augment-identifier "isid-match-entry";\r
168          leaf isid {\r
169              type uint32;\r
170          }\r
171      }\r
172      augment "/oxm:oxm-container/oxm:match-entries" {\r
173          ext:augment-identifier "pseudo-field-match-entry";\r
174          leaf pseudo-field {\r
175              type oft:ipv6-exthdr-flags;\r
176          }\r
177      }\r
178      augment "/oxm:oxm-container/oxm:match-entries" {\r
179          ext:augment-identifier "experimenter-id-match-entry";\r
180          leaf experimenter {\r
181              type oft:experimenter-id;\r
182          }\r
183      }\r
184      augment "/oxm:oxm-container/oxm:match-entries" {\r
185          ext:augment-identifier "tcp-flag-match-entry";\r
186          leaf tcp-flag {\r
187              type uint16;\r
188          }\r
189      }\r
190      augment "/oxm:oxm-container/oxm:match-entries" {\r
191          ext:augment-identifier "tunnel-ipv4-dst-match-entry";\r
192          leaf tunnel-ipv4-dst {\r
193              type inet:ipv4-address;\r
194          }\r
195      }\r
196      augment "/oxm:oxm-container/oxm:match-entries" {\r
197          ext:augment-identifier "tunnel-ipv4-src-match-entry";\r
198          leaf tunnel-ipv4-src {\r
199              type inet:ipv4-address;\r
200          }\r
201      }\r
202 \r
203 // OFP_ACTION AUGMENTS\r
204      augment "/ofaction:actions-container/ofaction:action" {\r
205          ext:augment-identifier "port-action";\r
206          leaf port {\r
207              type oft:port-number;\r
208          }\r
209      }\r
210      augment "/ofaction:actions-container/ofaction:action" {\r
211          ext:augment-identifier "max-length-action";\r
212          leaf max-length {\r
213              type uint16;\r
214          }\r
215      }\r
216      augment "/ofaction:actions-container/ofaction:action" {\r
217          ext:augment-identifier "mpls-ttl-action";\r
218          leaf mpls-ttl {\r
219              type uint8;\r
220          }\r
221      }\r
222      augment "/ofaction:actions-container/ofaction:action" {\r
223          ext:augment-identifier "ethertype-action";\r
224          leaf ethertype {\r
225              type oft:ether-type;\r
226          }\r
227      }\r
228      augment "/ofaction:actions-container/ofaction:action" {\r
229          ext:augment-identifier "queue-id-action";\r
230          leaf queue-id {\r
231              type uint32;\r
232          }\r
233      }\r
234      augment "/ofaction:actions-container/ofaction:action" {\r
235          ext:augment-identifier "group-id-action";\r
236          leaf group-id {\r
237              type uint32;\r
238          }\r
239      }\r
240      augment "/ofaction:actions-container/ofaction:action" {\r
241          ext:augment-identifier "nw-ttl-action";\r
242          leaf nw-ttl {\r
243              type uint8;\r
244          }\r
245      }\r
246      augment "/ofaction:actions-container/ofaction:action" {\r
247          ext:augment-identifier "oxm-fields-action";\r
248          uses oxm:oxm-fields-grouping;\r
249      }\r
250      augment "/ofaction:actions-container/ofaction:action" {\r
251          ext:augment-identifier "experimenter-id-action";\r
252          leaf experimenter {\r
253              type oft:experimenter-id;\r
254          }\r
255          leaf sub-type {\r
256             type identityref {\r
257                 base ofaction:experimenter-action-sub-type;\r
258             }\r
259          }\r
260      }\r
261      // OF1.0 structures\r
262      augment "/ofaction:actions-container/ofaction:action" {\r
263          ext:augment-identifier "vlan-vid-action";\r
264          leaf vlan-vid {\r
265              type uint16;\r
266          }\r
267      }\r
268      augment "/ofaction:actions-container/ofaction:action" {\r
269          ext:augment-identifier "vlan-pcp-action";\r
270          leaf vlan-pcp {\r
271              type uint8;\r
272          }\r
273      }\r
274      augment "/ofaction:actions-container/ofaction:action" {\r
275          ext:augment-identifier "dl-address-action";\r
276          leaf dl-address {\r
277              type yang:mac-address;\r
278          }\r
279      }\r
280      augment "/ofaction:actions-container/ofaction:action" {\r
281          ext:augment-identifier "nw-tos-action";\r
282          leaf nw-tos {\r
283              type uint8;\r
284          }\r
285      }\r
286      augment "/ofaction:actions-container/ofaction:action" {\r
287          ext:augment-identifier "ip-address-action";\r
288          leaf ip-address {\r
289              type inet:ipv4-address;\r
290          }\r
291      }\r
292 \r
293 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
294      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
295          ext:augment-identifier "instruction-related-table-feature-property";\r
296          uses ofinstruction:instructions-grouping;\r
297      }\r
298      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
299          ext:augment-identifier "next-table-related-table-feature-property";\r
300          list next-table-ids {\r
301              config false;\r
302              leaf table-id {\r
303                  type uint8;\r
304              }\r
305          }\r
306      }\r
307      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
308          ext:augment-identifier "action-related-table-feature-property";\r
309          uses ofaction:actions-grouping;\r
310      }\r
311      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
312          ext:augment-identifier "oxm-related-table-feature-property";\r
313          uses oxm:oxm-fields-grouping;\r
314      }\r
315      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
316          ext:augment-identifier "experimenter-id-table-feature-property";\r
317          leaf experimenter {\r
318              type oft:experimenter-id;\r
319          }\r
320          leaf exp-type {\r
321              type uint32;\r
322          }\r
323      }\r
324 \r
325 // OFP_INSTRUCTION AUGMENTS\r
326      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
327          ext:augment-identifier "table-id-instruction";\r
328          leaf table-id {\r
329              type uint8;\r
330          }\r
331      }\r
332      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
333          ext:augment-identifier "metadata-instruction";\r
334          leaf metadata {\r
335              type binary;\r
336          }\r
337          leaf metadata-mask {\r
338              type binary;\r
339          }\r
340      }\r
341      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
342          ext:augment-identifier "actions-instruction";\r
343          uses ofaction:actions-grouping;\r
344      }\r
345      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
346          ext:augment-identifier "meter-id-instruction";\r
347          leaf meter-id {\r
348              type uint32;\r
349          }\r
350      }\r
351      augment "/ofinstruction:instruction-container/ofinstruction:instruction" {\r
352          ext:augment-identifier "experimenter-id-instruction";\r
353          leaf experimenter {\r
354              type oft:experimenter-id;\r
355          }\r
356      }\r
357      \r
358 // OFP_QUEUE_PROP AUGMENTS\r
359      augment "/ofproto:queue-prop-container/ofproto:queue-property" {\r
360          ext:augment-identifier "rate-queue-property";\r
361          leaf rate {\r
362              type uint16;\r
363          }\r
364      }\r
365      augment "/ofproto:queue-prop-container/ofproto:queue-property" {\r
366          ext:augment-identifier "experimenter-id-queue-property";\r
367          leaf experimenter {\r
368              type oft:experimenter-id;\r
369          }\r
370      }\r
371      \r
372 // OFP_ERROR_AUGMENTS (only experimenter till OpenFlow v1.3)\r
373      augment "/ofproto:error-message" {\r
374          ext:augment-identifier "experimenter-id-error";\r
375          leaf experimenter {\r
376              type oft:experimenter-id;\r
377          }\r
378      }\r
379 \r
380 // OFP_MULTIPART AUGMENTS\r
381      augment "/ofproto:multipart-request/input/ofproto:multipart-request-body/ofproto:multipart-request-experimenter-case/ofproto:multipart-request-experimenter" {\r
382          ext:augment-identifier "experimenter-id-multipart-request";\r
383          leaf experimenter {\r
384              type oft:experimenter-id;\r
385          }\r
386          leaf exp-type {\r
387              type uint32;\r
388          }\r
389      }\r
390      augment "/ofproto:multipart-reply-message/ofproto:multipart-reply-body/ofproto:multipart-reply-experimenter-case/ofproto:multipart-reply-experimenter" {\r
391          ext:augment-identifier "experimenter-id-multipart-reply";\r
392          leaf experimenter {\r
393              type oft:experimenter-id;\r
394          }\r
395          leaf exp-type {\r
396              type uint32;\r
397          }\r
398      }\r
399 \r
400 // OFP_METER_BAND AUGMENTS\r
401      augment "/ofproto:meter-band-container/ofproto:meter-band/ofproto:meter-band-experimenter-case/ofproto:meter-band-experimenter" {\r
402          ext:augment-identifier "experimenter-id-meter-band";\r
403          leaf experimenter {\r
404              type oft:experimenter-id;\r
405          }\r
406      }\r
407 }