pyloxi: parse unknown subclasses as the superclass
Previously we would throw an exception if we encountered a (for example)
experimenter action subclass that we didn't know existed. This was fine for
OFTest but causes problems for other tools that use pyloxi.
This change generates a full set of pack/unpack/pretty_print functions for
virtual classes. If a discriminator field contains a subtype we don't know
about, the virtual class is instantiated instead.
This also removes the special cases around unknown hello elements.
diff --git a/py_gen/tests/of11.py b/py_gen/tests/of11.py
index d620509..7ae6d8a 100644
--- a/py_gen/tests/of11.py
+++ b/py_gen/tests/of11.py
@@ -69,7 +69,7 @@
for klass in mod.__dict__.values()
if isinstance(klass, type) and
issubclass(klass, loxi.OFObject) and
- hasattr(klass, 'pack')]
+ not hasattr(klass, 'subtypes')]
self.klasses.sort(key=lambda x: str(x))
def test_serialization(self):