Skip to content
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

Merged
merged 1 commit into from
Dec 2, 2014

Conversation

andi-bigswitch
Copy link
Contributor

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.

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.
@bsn-abat
Copy link

bsn-abat commented Dec 1, 2014

Test PASSed.
Refer to this link for build results: http://jenkins.bigswitch.com/job/loxigen_pull_req/95/

@@ -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) ]
Copy link
Contributor

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?

@andi-bigswitch
Copy link
Contributor Author

Fair enough -- it's a little bit inconsistent anyway tho, because other cases use += [ ]

@Sovietaced
Copy link
Contributor

Didn't even look outside -5/+5 lines to notice that. In that case it can be cleaned up later...

@Sovietaced
Copy link
Contributor

LGTM

@Sovietaced
Copy link
Contributor

ACK

@bsn-abat
Copy link

bsn-abat commented Dec 2, 2014

ABAT: START_MERGE: Log file at http://vss1/abat/2014.12.02.0718-m.loxigen.master/abat.log

bsn-abat pushed a commit to floodlight/loxigen-artifacts that referenced this pull request Dec 2, 2014
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.
@bsn-abat
Copy link

bsn-abat commented Dec 2, 2014

ABAT: ACCEPT: Successfully merged

In case you want to see the build log, check out :
Log file at http://vss1/abat/2014.12.02.0718-m.loxigen.master/abat.log
/cc

@bsn-abat bsn-abat merged commit 4d0752b into floodlight:master Dec 2, 2014
bsn-abat pushed a commit that referenced this pull request Dec 2, 2014
java_model: generate OFErrorMsg accessor for ErrorCause data (#356)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants