blob: c6386b3a8088d9a209bd9f68905d79fd5b059d2d [file] [log] [blame]
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -07001#
Zsolt Haraszti3eb27a52017-01-03 21:56:48 -08002# Copyright 2017 the original author or authors.
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -07003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17"""
18Convert loxi objects to openflow_13 messages and back.
19"""
20from copy import copy
21
22from google.protobuf.descriptor import FieldDescriptor
23
24import loxi.of13 as of13
25from protobuf_to_dict import protobuf_to_dict, TYPE_CALLABLE_MAP
26from protos import openflow_13_pb2 as pb2
27
28
29type_callable_map = copy(TYPE_CALLABLE_MAP)
30type_callable_map.update({
31 FieldDescriptor.TYPE_STRING: str
32})
33
34def pb2dict(pb):
35 """
36 Convert protobuf to a dict of values good for instantiating
37 loxi objects (or any other objects). We specialize the protobuf_to_dict
38 library call with our modified decoders.
39 :param pb: protobuf as loaded into Python
40 :return: dict of values
41 """
42 return protobuf_to_dict(pb, type_callable_map)
43
44def to_loxi(grpc_object):
45 cls = grpc_object.__class__
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -080046 converter = to_loxi_converters[cls.__name__]
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -070047 return converter(grpc_object)
48
49def to_grpc(loxi_object):
50 cls = loxi_object.__class__
51 converter = to_grpc_converters[cls]
52 return converter(loxi_object)
53
54def ofp_port_to_loxi_port_desc(pb):
55 kw = pb2dict(pb)
56 return of13.common.port_desc(**kw)
57
Zsolt Haraszti217a12e2016-12-19 16:37:55 -080058def ofp_port_status_to_loxi_port_status(pb):
59 return of13.message.port_status(
60 reason=pb.reason,
61 desc=ofp_port_to_loxi_port_desc(pb.desc)
62 )
63
Nicolas Palpacuerfd7b8b12018-06-15 13:58:06 -040064def ofp_port_stats_to_loxi_port_stats(pb):
65 kw = pb2dict(pb)
66 return of13.port_stats_entry(**kw)
67
Koray Kokten8592a232018-08-27 07:41:14 +000068def ofp_meter_stats_to_loxi_meter_stats(pb):
69 kw = pb2dict(pb)
70 return of13.meter_stats(**kw)
71
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -080072def make_loxi_field(oxm_field):
73 assert oxm_field['oxm_class'] == pb2.OFPXMC_OPENFLOW_BASIC
74 ofb_field = oxm_field['ofb_field']
75 field_type = ofb_field.get('type', 0)
76
77 if field_type == pb2.OFPXMT_OFB_ETH_TYPE:
78 return (
79 of13.oxm.eth_type(value=ofb_field['eth_type']))
80
81 elif field_type == pb2.OFPXMT_OFB_IN_PORT:
82 return (
83 of13.oxm.in_port(value=ofb_field['port']))
84
85 elif field_type == pb2.OFPXMT_OFB_IP_PROTO:
86 return (
87 of13.oxm.ip_proto(value=ofb_field['ip_proto']))
88
89 elif field_type == pb2.OFPXMT_OFB_VLAN_VID:
90 return (
91 of13.oxm.vlan_vid(value=ofb_field['vlan_vid']))
92
93 elif field_type == pb2.OFPXMT_OFB_VLAN_PCP:
94 return (
95 of13.oxm.vlan_pcp(value=ofb_field['vlan_pcp']))
96
97 elif field_type == pb2.OFPXMT_OFB_IPV4_SRC:
98 return (
99 of13.oxm.ipv4_src(value=ofb_field['ipv4_src']))
100
101 elif field_type == pb2.OFPXMT_OFB_IPV4_DST:
102 return (
103 of13.oxm.ipv4_dst(value=ofb_field['ipv4_dst']))
104
105 elif field_type == pb2.OFPXMT_OFB_UDP_SRC:
106 return (
107 of13.oxm.udp_src(value=ofb_field['udp_src']))
108
109 elif field_type == pb2.OFPXMT_OFB_UDP_DST:
110 return (
111 of13.oxm.udp_dst(value=ofb_field['udp_dst']))
112
113 elif field_type == pb2.OFPXMT_OFB_METADATA:
114 return (
115 of13.oxm.metadata(value=ofb_field['table_metadata']))
116
117 else:
118 raise NotImplementedError(
119 'OXM match field for type %s' % field_type)
120
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700121def make_loxi_match(match):
Zsolt Haraszti66862032016-11-28 14:28:39 -0800122 assert match.get('type', pb2.OFPMT_STANDARD) == pb2.OFPMT_OXM
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700123 loxi_match_fields = []
Zsolt Haraszti66862032016-11-28 14:28:39 -0800124 for oxm_field in match.get('oxm_fields', []):
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -0800125 loxi_match_fields.append(make_loxi_field(oxm_field))
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700126 return of13.match_v3(oxm_list=loxi_match_fields)
127
alshabibf4fb2682017-01-12 00:32:56 -0600128
129def make_loxi_action(a):
130 if type(a) is not dict:
131 a = pb2dict(a)
132
133 typ = a.get('type', 0)
134
135 if typ == pb2.OFPAT_OUTPUT:
136 output_kws = a['output']
137 return of13.action.output(**output_kws)
138
139 elif typ == pb2.OFPAT_POP_VLAN:
140 return of13.action.pop_vlan()
141
142 elif typ == pb2.OFPAT_PUSH_VLAN:
143 push_vlan_kws = a['push']
144 return of13.action.push_vlan(**push_vlan_kws)
145
146 elif typ == pb2.OFPAT_SET_FIELD:
147 loxi_field = make_loxi_field(a['set_field']['field'])
148 return of13.action.set_field(loxi_field)
149
150 elif typ == pb2.OFPAT_GROUP:
151 group_kws = a['group']
152 return of13.action.group(**group_kws)
153
154 else:
155 raise NotImplementedError(
156 'Action decoder for action OFPAT_* %d' % typ)
157
158
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700159def ofp_flow_stats_to_loxi_flow_stats(pb):
160 kw = pb2dict(pb)
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700161
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700162 def make_loxi_instruction(inst):
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700163 type = inst['type']
164 if type == pb2.OFPIT_APPLY_ACTIONS:
165 return of13.instruction.apply_actions(
166 actions=[make_loxi_action(a)
167 for a in inst['actions']['actions']])
Gamze Abaka61c2e982018-02-14 11:03:36 +0000168 elif type == pb2.OFPIT_CLEAR_ACTIONS:
169 return of13.instruction.clear_actions()
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -0800170 elif type == pb2.OFPIT_GOTO_TABLE:
171 return of13.instruction.goto_table(
172 table_id=inst['goto_table']['table_id'])
173
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700174 else:
175 raise NotImplementedError('Instruction type %d' % type)
176
177 kw['match'] = make_loxi_match(kw['match'])
178 kw['instructions'] = [make_loxi_instruction(i) for i in kw['instructions']]
Zsolt Haraszti66862032016-11-28 14:28:39 -0800179 del kw['id']
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700180 return of13.flow_stats_entry(**kw)
181
Zsolt Haraszti8925d1f2016-12-21 00:45:19 -0800182
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700183def ofp_packet_in_to_loxi_packet_in(pb):
Zsolt Haraszti8925d1f2016-12-21 00:45:19 -0800184 packet_in = of13.message.packet_in(
185 buffer_id=pb.buffer_id,
186 reason=pb.reason,
187 table_id=pb.table_id,
188 cookie=pb.cookie,
189 match=make_loxi_match(pb2dict(pb.match)),
190 data=pb.data
191 )
192 return packet_in
193
alshabibf4fb2682017-01-12 00:32:56 -0600194def ofp_group_desc_to_loxi_group_desc(pb):
195 return of13.group_desc_stats_entry(
196 group_type=pb.type,
197 group_id=pb.group_id,
198 buckets=[to_loxi(bucket) for bucket in pb.buckets])
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700199
alshabibf4fb2682017-01-12 00:32:56 -0600200
201def ofp_group_stats_to_loxi_group_stats(pb):
Zsolt Haraszti66862032016-11-28 14:28:39 -0800202 return of13.group_stats_entry(
alshabibf4fb2682017-01-12 00:32:56 -0600203 group_id=pb.group_id,
204 ref_count=pb.ref_count,
205 packet_count=pb.packet_count,
206 byte_count=pb.byte_count,
207 duration_sec=pb.duration_sec,
208 duration_nsec=pb.duration_nsec,
209 bucket_stats=[to_loxi(bstat) for bstat in pb.bucket_stats])
Zsolt Haraszti66862032016-11-28 14:28:39 -0800210
Zsolt Haraszti6a5107c2017-01-09 23:42:41 -0800211
Zsolt Haraszti66862032016-11-28 14:28:39 -0800212def ofp_bucket_counter_to_loxy_bucket_counter(pb):
213 return of13.bucket_counter(
214 packet_count=pb.packet_count,
215 byte_count=pb.byte_count)
216
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700217
alshabibf4fb2682017-01-12 00:32:56 -0600218def ofp_bucket_to_loxi_bucket(pb):
219 return of13.bucket(
220 weight=pb.weight,
221 watch_port=pb.watch_port,
222 watch_group=pb.watch_group,
223 actions=[to_loxi(action) for action in pb.actions]
224 )
225
226
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700227to_loxi_converters = {
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -0800228 'ofp_port': ofp_port_to_loxi_port_desc,
229 'ofp_port_status': ofp_port_status_to_loxi_port_status,
230 'ofp_flow_stats': ofp_flow_stats_to_loxi_flow_stats,
231 'ofp_packet_in': ofp_packet_in_to_loxi_packet_in,
alshabibf4fb2682017-01-12 00:32:56 -0600232 'ofp_group_stats': ofp_group_stats_to_loxi_group_stats,
233 'ofp_group_desc': ofp_group_desc_to_loxi_group_desc,
234 'ofp_bucket_counter': ofp_bucket_counter_to_loxy_bucket_counter,
235 'ofp_bucket': ofp_bucket_to_loxi_bucket,
Nicolas Palpacuerfd7b8b12018-06-15 13:58:06 -0400236 'ofp_action': make_loxi_action,
Koray Kokten8592a232018-08-27 07:41:14 +0000237 'ofp_port_stats': ofp_port_stats_to_loxi_port_stats,
238 'ofp_meter_stats': ofp_meter_stats_to_loxi_meter_stats
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700239}
240
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700241
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700242def loxi_flow_mod_to_ofp_flow_mod(lo):
243 return pb2.ofp_flow_mod(
244 cookie=lo.cookie,
245 cookie_mask=lo.cookie_mask,
246 table_id=lo.table_id,
247 command=lo._command,
248 idle_timeout=lo.idle_timeout,
249 hard_timeout=lo.hard_timeout,
250 priority=lo.priority,
251 buffer_id=lo.buffer_id,
252 out_port=lo.out_port,
253 out_group=lo.out_group,
254 flags=lo.flags,
255 match=to_grpc(lo.match),
256 instructions=[to_grpc(i) for i in lo.instructions])
257
Koray Kokten8592a232018-08-27 07:41:14 +0000258def loxi_meter_mod_to_ofp_meter_mod(lo):
259 return pb2.ofp_meter_mod(
260 command=lo.command,
261 flags=lo.flags,
262 meter_id=lo.meter_id,
263 bands=[to_grpc(i) for i in lo.meters])
264
265
266def loxi_meter_band_drop_to_ofp_meter_band_drop(lo):
267 return pb2.ofp_meter_band_header(
268 type=lo.type,
269 rate=lo.rate,
270 burst_size=lo.burst_size)
271
272
273def loxi_meter_band_dscp_remark_to_ofp_meter_band_dscp_remark(lo):
274 return pb2.ofp_meter_band_header(
275 type=lo.type,
276 rate=lo.rate,
277 burst_size=lo.burst_size,
278 dscp_remark=pb2.ofp_meter_band_dscp_remark(prec_level=lo.prec_level))
279
280
281def loxi_meter_band_experimenter_to_ofp_meter_band_experimenter(lo):
282 return pb2.ofp_meter_band_header(
283 type=lo.type,
284 rate=lo.rate,
285 burst_size=lo.burst_size,
286 experimenter=pb2.ofp_meter_band_experimenter(experimenter=lo.experimenter))
287
288
289def loxi_meter_multipart_request_to_ofp_meter_multipart_request(lo):
290 return pb2.ofp_meter_multipart_request(
291 meter_id=lo.meter_id)
292
293
294def loxi_meter_stats_to_ofp_meter_stats(lo):
295 return pb2.ofp_meter_stats(
296 meter_id=lo.meter_id,
297 flow_count=lo.flow_count,
298 packet_in_count =lo.packet_in_count,
299 byte_in_count=lo.byte_in_count,
300 duration_sec=lo.duration_sec,
301 duration_nsec=lo.duration_nsec,
302 band_stats=lo.band_stats)
303
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700304
305def loxi_group_mod_to_ofp_group_mod(lo):
306 return pb2.ofp_group_mod(
307 command=lo.command,
Zsolt Haraszti9125b1a2016-10-24 22:54:33 -0700308 type=lo.group_type,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700309 group_id=lo.group_id,
310 buckets=[to_grpc(b) for b in lo.buckets])
311
312
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700313def loxi_packet_out_to_ofp_packet_out(lo):
314 return pb2.ofp_packet_out(
315 buffer_id=lo.buffer_id,
316 in_port=lo.in_port,
317 actions=[to_grpc(a) for a in lo.actions],
318 data=lo.data)
319
320
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700321def loxi_match_v3_to_ofp_match(lo):
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700322 return pb2.ofp_match(
323 type=pb2.OFPMT_OXM,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700324 oxm_fields=[to_grpc(f) for f in lo.oxm_list])
325
326
327def loxi_bucket_to_ofp_bucket(lo):
328 return pb2.ofp_bucket(
329 weight=lo.weight,
330 watch_port=lo.watch_port,
331 watch_group=lo.watch_group,
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700332 actions=[to_grpc(a) for a in lo.actions])
333
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700334
335def loxi_oxm_eth_type_to_ofp_oxm(lo):
336 return pb2.ofp_oxm_field(
337 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
338 ofb_field=pb2.ofp_oxm_ofb_field(
339 type=pb2.OFPXMT_OFB_ETH_TYPE,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700340 eth_type=lo.value))
341
342
343def loxi_oxm_in_port_to_ofp_oxm(lo):
344 return pb2.ofp_oxm_field(
345 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
346 ofb_field=pb2.ofp_oxm_ofb_field(
347 type=pb2.OFPXMT_OFB_IN_PORT,
348 port=lo.value))
349
350
351def loxi_oxm_ip_proto_to_ofp_oxm(lo):
352 return pb2.ofp_oxm_field(
353 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
354 ofb_field=pb2.ofp_oxm_ofb_field(
355 type=pb2.OFPXMT_OFB_IP_PROTO,
356 ip_proto=lo.value))
357
358
359def loxi_oxm_vlan_vid_to_ofp_oxm(lo):
360 return pb2.ofp_oxm_field(
361 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
362 ofb_field=pb2.ofp_oxm_ofb_field(
363 type=pb2.OFPXMT_OFB_VLAN_VID,
364 vlan_vid=lo.value))
365
366
367def loxi_oxm_vlan_pcp_to_ofp_oxm(lo):
368 return pb2.ofp_oxm_field(
369 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
370 ofb_field=pb2.ofp_oxm_ofb_field(
371 type=pb2.OFPXMT_OFB_VLAN_PCP,
372 vlan_pcp=lo.value))
373
374
375def loxi_oxm_ipv4_dst_to_ofp_oxm(lo):
376 return pb2.ofp_oxm_field(
377 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
378 ofb_field=pb2.ofp_oxm_ofb_field(
379 type=pb2.OFPXMT_OFB_IPV4_DST,
380 ipv4_dst=lo.value))
381
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700382
Zsolt Haraszti6a5107c2017-01-09 23:42:41 -0800383def loxi_oxm_udp_dst_to_ofp_oxm(lo):
384 return pb2.ofp_oxm_field(
385 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
386 ofb_field=pb2.ofp_oxm_ofb_field(
387 type=pb2.OFPXMT_OFB_UDP_DST,
388 udp_dst=lo.value))
389
390
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -0800391def loxi_oxm_udp_src_to_ofp_oxm(lo):
392 return pb2.ofp_oxm_field(
393 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
394 ofb_field=pb2.ofp_oxm_ofb_field(
395 type=pb2.OFPXMT_OFB_UDP_SRC,
396 udp_src=lo.value))
397
398
Zsolt Haraszti6a5107c2017-01-09 23:42:41 -0800399def loxi_oxm_metadata_to_ofp_oxm(lo):
400 return pb2.ofp_oxm_field(
401 oxm_class=pb2.OFPXMC_OPENFLOW_BASIC,
402 ofb_field=pb2.ofp_oxm_ofb_field(
403 type=pb2.OFPXMT_OFB_METADATA,
404 table_metadata=lo.value))
405
406
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700407def loxi_apply_actions_to_ofp_instruction(lo):
408 return pb2.ofp_instruction(
409 type=pb2.OFPIT_APPLY_ACTIONS,
410 actions=pb2.ofp_instruction_actions(
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700411 actions=[to_grpc(a) for a in lo.actions]))
412
Gamze Abaka61c2e982018-02-14 11:03:36 +0000413def loxi_clear_actions_to_ofp_instruction(lo):
414 return pb2.ofp_instruction(
415 type=pb2.OFPIT_CLEAR_ACTIONS)
416
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700417
418def loxi_goto_table_to_ofp_instruction(lo):
419 return pb2.ofp_instruction(
420 type=pb2.OFPIT_GOTO_TABLE,
421 goto_table=pb2.ofp_instruction_goto_table(table_id=lo.table_id))
422
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700423
424def loxi_output_action_to_ofp_action(lo):
425 return pb2.ofp_action(
426 type=pb2.OFPAT_OUTPUT,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700427 output=pb2.ofp_action_output(port=lo.port, max_len=lo.max_len))
428
429
430def loxi_group_action_to_ofp_action(lo):
431 return pb2.ofp_action(
432 type=pb2.OFPAT_GROUP,
433 group=pb2.ofp_action_group(group_id=lo.group_id))
434
435
436def loxi_set_field_action_to_ofp_action(lo):
437 return pb2.ofp_action(
438 type=pb2.OFPAT_SET_FIELD,
439 set_field=pb2.ofp_action_set_field(field=to_grpc(lo.field)))
440
441
442def loxi_pop_vlan_action_to_ofp_action(lo):
443 return pb2.ofp_action(type=pb2.OFPAT_POP_VLAN)
444
445
446def loxi_push_vlan_action_to_ofp_action(lo):
447 return pb2.ofp_action(
448 type=pb2.OFPAT_PUSH_VLAN,
449 push=pb2.ofp_action_push(ethertype=lo.ethertype))
450
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700451
452to_grpc_converters = {
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700453
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700454 of13.message.flow_add: loxi_flow_mod_to_ofp_flow_mod,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700455 of13.message.flow_delete: loxi_flow_mod_to_ofp_flow_mod,
456 of13.message.flow_delete_strict: loxi_flow_mod_to_ofp_flow_mod,
457 of13.message.flow_modify: loxi_flow_mod_to_ofp_flow_mod,
458 of13.message.flow_modify_strict: loxi_flow_mod_to_ofp_flow_mod,
Koray Kokten8592a232018-08-27 07:41:14 +0000459 of13.message.meter_mod: loxi_meter_mod_to_ofp_meter_mod,
460 of13.message.meter_stats_request: loxi_meter_stats_to_ofp_meter_stats,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700461
462 of13.message.group_add: loxi_group_mod_to_ofp_group_mod,
463 of13.message.group_delete: loxi_group_mod_to_ofp_group_mod,
464 of13.message.group_modify: loxi_group_mod_to_ofp_group_mod,
Zsolt Haraszticd22adc2016-10-25 00:13:06 -0700465 of13.message.packet_out: loxi_packet_out_to_ofp_packet_out,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700466
Koray Kokten8592a232018-08-27 07:41:14 +0000467 of13.meter_band.drop: loxi_meter_band_drop_to_ofp_meter_band_drop,
468 of13.meter_band.dscp_remark: loxi_meter_band_dscp_remark_to_ofp_meter_band_dscp_remark,
469 of13.meter_band.experimenter: loxi_meter_band_experimenter_to_ofp_meter_band_experimenter,
470
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700471 of13.common.match_v3: loxi_match_v3_to_ofp_match,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700472 of13.common.bucket: loxi_bucket_to_ofp_bucket,
473
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700474 of13.oxm.eth_type: loxi_oxm_eth_type_to_ofp_oxm,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700475 of13.oxm.in_port: loxi_oxm_in_port_to_ofp_oxm,
476 of13.oxm.ip_proto: loxi_oxm_ip_proto_to_ofp_oxm,
477 of13.oxm.vlan_vid: loxi_oxm_vlan_vid_to_ofp_oxm,
478 of13.oxm.vlan_pcp: loxi_oxm_vlan_pcp_to_ofp_oxm,
479 of13.oxm.ipv4_dst: loxi_oxm_ipv4_dst_to_ofp_oxm,
Zsolt Haraszti3578a1c2017-01-10 15:29:02 -0800480 of13.oxm.udp_src: loxi_oxm_udp_src_to_ofp_oxm,
Zsolt Haraszti6a5107c2017-01-09 23:42:41 -0800481 of13.oxm.udp_dst: loxi_oxm_udp_dst_to_ofp_oxm,
482 of13.oxm.metadata: loxi_oxm_metadata_to_ofp_oxm,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700483
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700484 of13.instruction.apply_actions: loxi_apply_actions_to_ofp_instruction,
Gamze Abaka61c2e982018-02-14 11:03:36 +0000485 of13.instruction.clear_actions: loxi_clear_actions_to_ofp_instruction,
Zsolt Haraszti8a774382016-10-24 18:25:54 -0700486 of13.instruction.goto_table: loxi_goto_table_to_ofp_instruction,
487
488 of13.action.output: loxi_output_action_to_ofp_action,
489 of13.action.group: loxi_group_action_to_ofp_action,
490 of13.action.set_field: loxi_set_field_action_to_ofp_action,
491 of13.action.pop_vlan: loxi_pop_vlan_action_to_ofp_action,
492 of13.action.push_vlan: loxi_push_vlan_action_to_ofp_action,
Zsolt Haraszti023ea7c2016-10-16 19:30:34 -0700493}