openflow_input: add discriminators to experimenter superclasses
Also fix the Python backend to replace its logic for ignoring virtual classes
to just use the IR.
diff --git a/py_gen/codegen.py b/py_gen/codegen.py
index 6570938..540d212 100644
--- a/py_gen/codegen.py
+++ b/py_gen/codegen.py
@@ -54,13 +54,10 @@
# Create intermediate representation, extended from the LOXI IR
# HACK the oftype member attribute is replaced with an OFType instance
def build_ofclasses(version):
- blacklist = ["of_experimenter", "of_action_experimenter"]
ofclasses = []
for ofclass in of_g.ir[version].classes:
cls = ofclass.name
- if type_maps.class_is_virtual(cls):
- continue
- if cls in blacklist:
+ if ofclass.virtual:
continue
members = []
diff --git a/py_gen/templates/message.py b/py_gen/templates/message.py
index 6754b94..7158545 100644
--- a/py_gen/templates/message.py
+++ b/py_gen/templates/message.py
@@ -226,11 +226,6 @@
const.OFPST_TABLE : table_stats_reply.unpack,
const.OFPST_PORT : port_stats_reply.unpack,
const.OFPST_QUEUE : queue_stats_reply.unpack,
-:: if version < of_g.VERSION_1_1:
- const.OFPST_VENDOR : experimenter_stats_reply.unpack,
-:: else:
- const.OFPST_EXPERIMENTER : experimenter_stats_reply.unpack,
-:: #endif
:: if version >= of_g.VERSION_1_1:
const.OFPST_GROUP : group_stats_reply.unpack,
const.OFPST_GROUP_DESC : group_desc_stats_reply.unpack,
@@ -247,11 +242,6 @@
const.OFPST_TABLE : table_stats_request.unpack,
const.OFPST_PORT : port_stats_request.unpack,
const.OFPST_QUEUE : queue_stats_request.unpack,
-:: if version < of_g.VERSION_1_1:
- const.OFPST_VENDOR : experimenter_stats_request.unpack,
-:: else:
- const.OFPST_EXPERIMENTER : experimenter_stats_request.unpack,
-:: #endif
:: if version >= of_g.VERSION_1_1:
const.OFPST_GROUP : group_stats_request.unpack,
const.OFPST_GROUP_DESC : group_desc_stats_request.unpack,