pyloxi: implement of_meter_features_t
diff --git a/py_gen/oftype.py b/py_gen/oftype.py
index 0bf99f9..7719432 100644
--- a/py_gen/oftype.py
+++ b/py_gen/oftype.py
@@ -63,6 +63,8 @@
v = 'common.match()'
elif self.base == 'of_port_desc_t':
v = 'common.port_desc()'
+ elif self.base == 'of_meter_features_t':
+ v = 'common.meter_features()'
else:
v = "None"
@@ -85,7 +87,7 @@
return 'struct.pack("!6B", *%s)' % expr_expr
elif self.base == 'of_ipv6_t':
return 'struct.pack("!16s", %s)' % expr_expr
- elif self.base in ['of_match_t', 'of_port_desc_t']:
+ elif self.base in ['of_match_t', 'of_port_desc_t', 'of_meter_features_t']:
return '%s.pack()' % expr_expr
elif self.base == 'of_port_name_t':
return self._gen_string_pack_expr(16, expr_expr)
@@ -144,6 +146,8 @@
return self._gen_string_unpack_expr(reader_expr, 32)
elif self.base == 'of_desc_str_t':
return self._gen_string_unpack_expr(reader_expr, 256)
+ elif self.base == 'of_meter_features_t':
+ return 'common.meter_features.unpack(%s)' % (reader_expr)
elif utils.class_is_list(self.base):
element_cls = utils.list_to_entry_type(self.base)[:-2]
if ((element_cls, self.version) in of_g.is_fixed_length) \