Finished actions + match + instructions (de)serialization
[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 bits {\r
165                  bit nonext {\r
166                      description "<No next header> encountered.";\r
167                      position 0;\r
168                  }\r
169                  bit esp {\r
170                      description "Encrypted Sec Payload header present.";\r
171                      position 1;\r
172                  }\r
173                  bit auth {\r
174                      description "Authentication header present.";\r
175                      position 2;\r
176                  }\r
177                  bit dest {\r
178                      description "1 or 2 dest headers present.";\r
179                      position 3;\r
180                  }\r
181                  bit frag {\r
182                      description "Fragment header present.";\r
183                      position 4;\r
184                  }\r
185                  bit router {\r
186                      description "Router header present.";\r
187                      position 5;\r
188                  }\r
189                  bit hop {\r
190                      description "Hop-by-hop header present.";\r
191                      position 6;\r
192                  }\r
193                  bit unrep {\r
194                      description "Unexpected repeats encountered.";\r
195                      position 7;\r
196                  }\r
197                  bit unseq {\r
198                      description "Unexpected sequencing encountered.";\r
199                      position 8;\r
200                  }\r
201              }\r
202          }\r
203      }\r
204 \r
205 // OFP_ACTION AUGMENTS\r
206      augment "/ofaction:actions-container/ofaction:action" {\r
207          ext:augment-identifier "port-action";\r
208          leaf port {\r
209              type oft:port-number;\r
210          }\r
211      }\r
212      augment "/ofaction:actions-container/ofaction:action" {\r
213          ext:augment-identifier "max-length-action";\r
214          leaf max-length {\r
215              type uint16;\r
216          }\r
217      }\r
218      augment "/ofaction:actions-container/ofaction:action" {\r
219          ext:augment-identifier "mpls-ttl-action";\r
220          leaf mpls-ttl {\r
221              type uint8;\r
222          }\r
223      }\r
224      augment "/ofaction:actions-container/ofaction:action" {\r
225          ext:augment-identifier "ethertype-action";\r
226          leaf ethertype {\r
227              type oft:ether-type;\r
228          }\r
229      }\r
230      augment "/ofaction:actions-container/ofaction:action" {\r
231          ext:augment-identifier "queue-id-action";\r
232          leaf queue-id {\r
233              type uint32;\r
234          }\r
235      }\r
236      augment "/ofaction:actions-container/ofaction:action" {\r
237          ext:augment-identifier "group-id-action";\r
238          leaf group-id {\r
239              type uint32;\r
240          }\r
241      }\r
242      augment "/ofaction:actions-container/ofaction:action" {\r
243          ext:augment-identifier "nw-ttl-action";\r
244          leaf nw-ttl {\r
245              type uint8;\r
246          }\r
247      }\r
248      augment "/ofaction:actions-container/ofaction:action" {\r
249          ext:augment-identifier "oxm-fields-action";\r
250          uses oxm:oxm-fields;\r
251      }\r
252      augment "/ofaction:actions-container/ofaction:action" {\r
253          ext:augment-identifier "experimenter-action";\r
254          leaf experimenter {\r
255              type uint32;\r
256          }\r
257      }\r
258 \r
259 // OFP_TABLE_FEATURES_PROPERTIES AUGMENTS\r
260      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
261          ext:augment-identifier "instruction-related-table-feature-property";\r
262          list instruction-ids {\r
263              uses ofinstruction:instructions;\r
264          }\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              leaf table-id {\r
270                  type uint8;\r
271              }\r
272          }\r
273      }\r
274      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
275          ext:augment-identifier "action-related-table-feature-property";\r
276          list action-ids {\r
277              uses ofaction:actions;\r
278          }\r
279      }\r
280      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
281          ext:augment-identifier "oxm-related-table-feature-property";\r
282          list oxm-ids {\r
283              uses oxm:oxm-fields;\r
284          }\r
285      }\r
286      augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" {\r
287          ext:augment-identifier "experimenter-related-table-feature-property";\r
288          leaf experimenter {\r
289              type uint32;\r
290          }\r
291          leaf exp-type {\r
292              type uint32;\r
293          }\r
294          leaf data {\r
295              type binary;\r
296          }\r
297      }\r
298 \r
299 // OFP_INSTRUCTION AUGMENTS\r
300      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
301          ext:augment-identifier "table-id-instruction";\r
302          leaf table-id {\r
303              type uint8;\r
304          }\r
305      }\r
306      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
307          ext:augment-identifier "metadata-instruction";\r
308          leaf metadata {\r
309              type binary;\r
310          }\r
311          leaf metadata-mask {\r
312              type binary;\r
313          }\r
314      }\r
315      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
316          ext:augment-identifier "actions-instruction";\r
317          uses ofaction:actions;\r
318      }\r
319      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
320          ext:augment-identifier "meter-id-instruction";\r
321          leaf meter-id {\r
322              type uint32;\r
323          }\r
324      }\r
325      augment "/ofinstruction:instruction-container/ofinstruction:instructions" {\r
326          ext:augment-identifier "experimenter-instruction";\r
327          leaf experimenter {\r
328              type uint32;\r
329          }\r
330          leaf data {\r
331              type binary;\r
332          }\r
333      }\r
334 }