Added copyright in yang files
[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     }\r
26 \r
27 // OFP_MATCH AUGMENTS\r
28      augment "/oxm:oxm-container/oxm:match-entries" {\r
29          ext:augment-identifier "port-number-match-entry";\r
30          leaf port-number {\r
31              type oft:port-number;\r
32          }\r
33      }\r
34      augment "/oxm:oxm-container/oxm:match-entries" {\r
35          ext:augment-identifier "metadata-match-entry";\r
36          leaf metadata {\r
37              type binary;\r
38          }\r
39      }\r
40      augment "/oxm:oxm-container/oxm:match-entries" {\r
41          ext:augment-identifier "mask-match-entry";\r
42          leaf mask {\r
43              type binary;\r
44          }\r
45      }\r
46      augment "/oxm:oxm-container/oxm:match-entries" {\r
47          ext:augment-identifier "mac-address-match-entry";\r
48          leaf mac-address {\r
49              type yang:mac-address;\r
50          }\r
51      }\r
52      augment "/oxm:oxm-container/oxm:match-entries" {\r
53          ext:augment-identifier "eth-type-match-entry";\r
54          leaf eth-type {\r
55              type oft:ether-type;\r
56          }\r
57      }\r
58      augment "/oxm:oxm-container/oxm:match-entries" {\r
59          ext:augment-identifier "vlan-vid-match-entry";\r
60          leaf vlan-vid {\r
61              type uint16;\r
62          }\r
63          leaf cfi-bit {\r
64              type boolean;\r
65          }\r
66      }\r
67      augment "/oxm:oxm-container/oxm:match-entries" {\r
68          ext:augment-identifier "vlan-pcp-match-entry";\r
69          leaf vlan-pcp {\r
70              type uint8;\r
71          }\r
72      }\r
73      augment "/oxm:oxm-container/oxm:match-entries" {\r
74          ext:augment-identifier "dscp-match-entry";\r
75          leaf dscp {\r
76              type inet:dscp;\r
77          }\r
78      }\r
79      augment "/oxm:oxm-container/oxm:match-entries" {\r
80          ext:augment-identifier "ecn-match-entry";\r
81          leaf ecn {\r
82              type uint8;\r
83          }\r
84      }\r
85      augment "/oxm:oxm-container/oxm:match-entries" {\r
86          ext:augment-identifier "protocol-number-match-entry";\r
87          leaf protocol-number {\r
88              type uint8;\r
89          }\r
90      }\r
91      augment "/oxm:oxm-container/oxm:match-entries" {\r
92          ext:augment-identifier "port-match-entry";\r
93          leaf port {\r
94              type inet:port-number;\r
95          }\r
96      }\r
97      augment "/oxm:oxm-container/oxm:match-entries" {\r
98          ext:augment-identifier "icmpv4-type-match-entry";\r
99          leaf icmpv4-type {\r
100              type uint8;\r
101          }\r
102      }\r
103      augment "/oxm:oxm-container/oxm:match-entries" {\r
104          ext:augment-identifier "icmpv4-code-match-entry";\r
105          leaf icmpv4-code {\r
106              type uint8;\r
107          }\r
108      }\r
109      augment "/oxm:oxm-container/oxm:match-entries" {\r
110          ext:augment-identifier "op-code-match-entry";\r
111          leaf op-code {\r
112              type uint16;\r
113          }\r
114      }\r
115      augment "/oxm:oxm-container/oxm:match-entries" {\r
116          ext:augment-identifier "ipv6-flabel-match-entry";\r
117          leaf ipv6-flabel {\r
118              type inet:ipv6-flow-label;\r
119          }\r
120      }\r
121      augment "/oxm:oxm-container/oxm:match-entries" {\r
122          ext:augment-identifier "icmpv6-type-match-entry";\r
123          leaf icmpv6-type {\r
124              type uint8;\r
125          }\r
126      }\r
127      augment "/oxm:oxm-container/oxm:match-entries" {\r
128          ext:augment-identifier "icmpv6-code-match-entry";\r
129          leaf icmpv6-code {\r
130              type uint8;\r
131          }\r
132      }\r
133      augment "/oxm:oxm-container/oxm:match-entries" {\r
134          ext:augment-identifier "ipv6-address-match-entry";\r
135          leaf ipv6-address {\r
136              type inet:ipv6-address;\r
137          }\r
138      }\r
139      augment "/oxm:oxm-container/oxm:match-entries" {\r
140          ext:augment-identifier "ipv4-address-match-entry";\r
141          leaf ipv4-address {\r
142              type inet:ipv4-address;\r
143          }\r
144      }\r
145      augment "/oxm:oxm-container/oxm:match-entries" {\r
146          ext:augment-identifier "mpls-label-match-entry";\r
147          leaf mpls-label {\r
148              type uint32;\r
149          }\r
150      }\r
151      augment "/oxm:oxm-container/oxm:match-entries" {\r
152          ext:augment-identifier "tc-match-entry";\r
153          leaf tc {\r
154              type uint8;\r
155          }\r
156      }\r
157      augment "/oxm:oxm-container/oxm:match-entries" {\r
158          ext:augment-identifier "bos-match-entry";\r
159          leaf bos {\r
160              type boolean;\r
161          }\r
162      }\r
163      augment "/oxm:oxm-container/oxm:match-entries" {\r
164          ext:augment-identifier "isid-match-entry";\r
165          leaf isid {\r
166              type uint32;\r
167          }\r
168      }\r
169      augment "/oxm:oxm-container/oxm:match-entries" {\r
170          ext:augment-identifier "pseudo-field-match-entry";\r
171          leaf pseudo-field {\r
172              type oft:ipv6-exthdr-flags;\r
173          }\r
174      }\r
175 \r
176 // OFP_ACTION AUGMENTS\r
177      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
178          ext:augment-identifier "port-action";\r
179          leaf port {\r
180              type oft:port-number;\r
181          }\r
182      }\r
183      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
184          ext:augment-identifier "max-length-action";\r
185          leaf max-length {\r
186              type uint16;\r
187          }\r
188      }\r
189      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
190          ext:augment-identifier "mpls-ttl-action";\r
191          leaf mpls-ttl {\r
192              type uint8;\r
193          }\r
194      }\r
195      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
196          ext:augment-identifier "ethertype-action";\r
197          leaf ethertype {\r
198              type oft:ether-type;\r
199          }\r
200      }\r
201      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
202          ext:augment-identifier "queue-id-action";\r
203          leaf queue-id {\r
204              type uint32;\r
205          }\r
206      }\r
207      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
208          ext:augment-identifier "group-id-action";\r
209          leaf group-id {\r
210              type uint32;\r
211          }\r
212      }\r
213      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
214          ext:augment-identifier "nw-ttl-action";\r
215          leaf nw-ttl {\r
216              type uint8;\r
217          }\r
218      }\r
219      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
220          ext:augment-identifier "oxm-fields-action";\r
221          uses oxm:oxm-fields;\r
222      }\r
223      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
224          ext:augment-identifier "experimenter-action";\r
225          leaf experimenter {\r
226              type uint32;\r
227          }\r
228      }\r
229      // OF1.0 structures\r
230      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
231          ext:augment-identifier "vlan-vid-action";\r
232          leaf vlan-vid {\r
233              type uint16;\r
234          }\r
235      }\r
236      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
237          ext:augment-identifier "vlan-pcp-action";\r
238          leaf vlan-pcp {\r
239              type uint8;\r
240          }\r
241      }\r
242      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
243          ext:augment-identifier "dl-address-action";\r
244          leaf dl-address {\r
245              type yang:mac-address;\r
246          }\r
247      }\r
248      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
249          ext:augment-identifier "nw-tos-action";\r
250          leaf nw-tos {\r
251              type uint8;\r
252          }\r
253      }\r
254      augment "/ofaction:actions-container/ofaction:actions-list/ofaction:action" {\r
255          ext:augment-identifier "ip-address-action";\r
256          leaf ip-address {\r
257              type inet:ipv4-address;\r
258          }\r
259      }\r
260 \r
261 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
262      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
263          ext:augment-identifier "instruction-related-table-feature-property";\r
264          uses ofinstruction:instructions;\r
265      }\r
266      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
267          ext:augment-identifier "next-table-related-table-feature-property";\r
268          list next-table-ids {\r
269              key "table-id";\r
270              leaf table-id {\r
271                  type uint8;\r
272              }\r
273          }\r
274      }\r
275      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
276          ext:augment-identifier "action-related-table-feature-property";\r
277          uses ofaction:actions;\r
278      }\r
279      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
280          ext:augment-identifier "oxm-related-table-feature-property";\r
281          uses oxm:oxm-fields;\r
282      }\r
283      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
284          ext:augment-identifier "experimenter-related-table-feature-property";\r
285          leaf experimenter {\r
286              type uint32;\r
287          }\r
288          leaf exp-type {\r
289              type uint32;\r
290          }\r
291          leaf data {\r
292              type binary;\r
293          }\r
294      }\r
295 \r
296 // OFP_INSTRUCTION AUGMENTS\r
297      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
298          ext:augment-identifier "table-id-instruction";\r
299          leaf table-id {\r
300              type uint8;\r
301          }\r
302      }\r
303      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
304          ext:augment-identifier "metadata-instruction";\r
305          leaf metadata {\r
306              type binary;\r
307          }\r
308          leaf metadata-mask {\r
309              type binary;\r
310          }\r
311      }\r
312      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
313          ext:augment-identifier "actions-instruction";\r
314          uses ofaction:actions;\r
315      }\r
316      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
317          ext:augment-identifier "meter-id-instruction";\r
318          leaf meter-id {\r
319              type uint32;\r
320          }\r
321      }\r
322      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
323          ext:augment-identifier "experimenter-instruction";\r
324          leaf experimenter {\r
325              type uint32;\r
326          }\r
327          leaf data {\r
328              type binary;\r
329          }\r
330      }\r
331      \r
332 // OFP_QUEUE_PROP AUGMENTS\r
333      augment "/ofproto:queue-prop-container/ofproto:queue-property" {\r
334          ext:augment-identifier "rate-queue-property";\r
335          leaf rate {\r
336              type uint16;\r
337          }\r
338      }\r
339      augment "/ofproto:queue-prop-container/ofproto:queue-property" {\r
340          ext:augment-identifier "experimenter-queue-property";\r
341          leaf experimenter {\r
342              type uint32;\r
343          }\r
344          leaf data {\r
345              type binary;\r
346          }\r
347      }\r
348      \r
349 // OFP_ERROR_AUGMENTS (only experimenter till OpenFlow v1.3)\r
350     augment "/ofproto:error-message" {\r
351          ext:augment-identifier "experimenter-error";\r
352          leaf exp_type {\r
353              type uint16;\r
354          }\r
355          leaf experimenter {\r
356              type uint32;\r
357          }\r
358      }\r
359 \r
360 }