-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyloxi: parse unknown subclasses as the superclass #186
Conversation
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.
@@ -60,18 +60,6 @@ def test_version(self): | |||
self.assertTrue(hasattr(loxi.of13, "message")) | |||
self.assertTrue(hasattr(loxi.of13, "oxm")) | |||
|
|||
class TestCommon(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should maybe have a test_data case that validates handling of unknown hello_elems (though it would probably break Java at this point)
LGTM (btw it would be really neat if we had a 'pull request builder' that would publish the artifacts of a PR somewhere were they can easily be inspected.) We could probably put that into Jenkins... ACK |
ABAT: START_MERGE: Log file at http://sbs2/abat/2014.01.29.0258-m.loxigen.master/abat.log |
Loxigen Head commit floodlight/loxigen@074f709 commit 074f7096e8fd4e7a63d2b9cbba68e60be9a87f31 Merge: f8498dd 038c9e6 Author: abat <abat@bigswitch.com> Date: Tue Jan 28 18:58:32 2014 -0800 Merge into master from pull request #186: pyloxi: parse unknown subclasses as the superclass (floodlight/loxigen#186) commit 038c9e6106e8756c1cd152bbbdc2ee75ffba7689 Author: Rich Lane <rlane@bigswitch.com> Date: Mon Jan 27 15:33:18 2014 -0800 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.
pyloxi: parse unknown subclasses as the superclass (#186)
ABAT: ACCEPT: Successfully merged In case you want to see the build log, check out : |
Reviewer: @andi-bigswitch
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.