-
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
java_model: generate OFErrorMsg accessor for ErrorCause data #356
Conversation
in the loxigen model, the virtual of_error_msg superclass does not have a data field) (but all its concrete subclasses have one). This little patch makes the java model generate a "data" contract in the interface anyway, which is useful for error handling schemes that depend on the type of the causing message.
Test PASSed. |
@@ -587,6 +587,8 @@ def virtual_members(self): | |||
if not find(lambda x: x.name == "mask", self.ir_model_members): | |||
virtual_members.append( | |||
JavaVirtualMember(self, "mask", find(lambda x: x.name == "value", self.ir_model_members).java_type)) | |||
elif self.name =="OFErrorMsg": | |||
virtual_members += [ JavaVirtualMember(self, "data", java_type.error_cause_data) ] |
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.
why not virtual_members.append for consistency?
Fair enough -- it's a little bit inconsistent anyway tho, because other cases use |
Didn't even look outside -5/+5 lines to notice that. In that case it can be cleaned up later... |
LGTM |
ACK |
ABAT: START_MERGE: Log file at http://vss1/abat/2014.12.02.0718-m.loxigen.master/abat.log |
Loxigen Head commit floodlight/loxigen@fcc3792 commit fcc37923e9308155c9c61534e37061cfc3c6cdde Merge: 15cadf5 4d0752b Author: abat <abat@bigswitch.com> Date: Mon Dec 1 23:18:33 2014 -0800 Merge into master from pull request #356: java_model: generate OFErrorMsg accessor for ErrorCause data (floodlight/loxigen#356) commit 4d0752b46a4b0a18ad307b64d83ff6e9d011c46f Author: Andreas Wundsam <andreas.wundsam@bigswitch.com> Date: Mon Dec 1 13:14:07 2014 -0800 java_model: generate OFErrorMsg accessor for ErrorCause data in the loxigen model, the virtual of_error_msg superclass does not have a data field) (but all its concrete subclasses have one). This little patch makes the java model generate a "data" contract in the interface anyway, which is useful for error handling schemes that depend on the type of the causing message.
ABAT: ACCEPT: Successfully merged In case you want to see the build log, check out : |
java_model: generate OFErrorMsg accessor for ErrorCause data (#356)
Reviewer: @Sovietaced @vishnu-emmadi @rlane
in the loxigen model, the virtual of_error_msg superclass does not have
a data field) (but all its concrete subclasses have one). This little
patch makes the java model generate a "data" contract in the interface
anyway, which is useful for error handling schemes that depend on the
type of the causing message.