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