loxi_utils: remove duplicated / unused methods
diff --git a/c_gen/loxi_utils_legacy.py b/c_gen/loxi_utils_legacy.py
index 47b1430..699006f 100644
--- a/c_gen/loxi_utils_legacy.py
+++ b/c_gen/loxi_utils_legacy.py
@@ -517,29 +517,3 @@
raise ValueError("template %s not found" % name)
with open(template_filename) as infile:
out.write(infile.read())
-
-@memoize
-def lookup_ir_wiretype(oftype, version):
- """ if of is a reference to an enum in ir, resolve it to the wiretype
- declared in that enum. Else return oftype """
- enums = of_g.ir[version].enums
- enum = find(lambda e: e.name == oftype, enums)
- if enum and 'wire_type' in enum.params:
- return enum.params['wire_type']
- else:
- return oftype
-
-class TemplateEngine(tenjin.Engine):
- def include(self, template_name, **kwargs):
- """
- Tenjin has an issue with nested includes that use the same local variable
- names, because it uses the same context dict for each level of nesting.
- The fix is to copy the context.
- """
- frame = sys._getframe(1)
- locals = frame.f_locals
- globals = frame.f_globals
- context = locals["_context"].copy()
- context.update(kwargs)
- template = self.get_template(template_name, context, globals)
- return template.render(context, globals, _buf=locals["_buf"])
diff --git a/loxi_utils/loxi_utils.py b/loxi_utils/loxi_utils.py
index f4cd950..d5937ac 100644
--- a/loxi_utils/loxi_utils.py
+++ b/loxi_utils/loxi_utils.py
@@ -80,38 +80,6 @@
else:
return _unified_by_name(cls).is_instanceof("of_header")
-def class_is_tlv16(cls):
- """
- Return True if cls_name is an object which uses uint16 for type and length
- """
- if cls.find("of_action") == 0: # Includes of_action_id classes
- return True
- if cls.find("of_instruction") == 0:
- return True
- if cls.find("of_queue_prop") == 0:
- return True
- if cls.find("of_table_feature_prop") == 0:
- return True
- # *sigh*
- if cls.find("of_meter_band_stats") == 0: # NOT A TLV
- return False
- if cls.find("of_meter_band") == 0:
- return True
- if cls.find("of_hello_elem") == 0:
- return True
- if cls == "of_match_v3":
- return True
- if cls == "of_match_v4":
- return True
- return False
-
-def class_is_u16_len(cls):
- """
- Return True if cls_name is an object which uses initial uint16 length
- """
- return cls in ["of_group_desc_stats_entry", "of_group_stats_entry",
- "of_flow_stats_entry", "of_bucket", "of_table_features"]
-
def class_is_oxm(cls):
"""
Return True if cls_name is an OXM object