-
Notifications
You must be signed in to change notification settings - Fork 22
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
add missing coercions #12
add missing coercions #12
Conversation
def coerce(variable) | ||
variable_syntax = variable.getSyntax | ||
# puts("variable.getSyntaxString=#{variable.getSyntaxString}") | ||
case variable_syntax | ||
when BER::OCTETSTRING | ||
when BER::OCTETSTRING, BER::BITSTRING |
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.
is there any place we can find the whole list of possible options?
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.
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.
LGTM
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.
LGTM
def coerce(variable) | ||
variable_syntax = variable.getSyntax | ||
# puts("variable.getSyntaxString=#{variable.getSyntaxString}") | ||
case variable_syntax | ||
when BER::OCTETSTRING | ||
when BER::OCTETSTRING, BER::BITSTRING |
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.
You have a require for java_import "org.snmp4j.smi.OctetString"
. Do you need to add one for BitString
as well?
Actually I see you don't have requires for the counters. Ok, I guess I don't have enough context here :-)
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.
Yeah I figured out that it's probably coming from the asn1.BER
import. Never mind :-)
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.
the OctetString
class is required for the build_target
method - not needed for the coercion.
Fixes #11
This adds some missing coercions for
BITSTRING
,COUNTER64
andNULL
.Tested manually locally, no spec coverage for this yet (working on it for larger
Client
class specs.