-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
more than 255 arguments #15
Comments
Thank you for raising this issue! The fix is here, I'd appreciate your testing and reporting back how it worked for you. So I could merge that branch and make a release. |
Thanks for resolving this so quickly. I'll test it and let you know.
|
Hi Ilya, The fix works in my case, but I don't why it would work. From the fix, it seems that cascading setObject() would result in only the last setObject() call being effective. The source code for ObjectGroup class in SNMPv2_CONF.py looks like: class ObjectGroup(MibNode):
So calling the setObjects() twice would void the first call. Did I miss something here? Regards, |
Hey Kevin,
You are right, that's my bad! I've reworked the pysmi implementation (564f845) and added the incremental objects adding mode to pysnmp (commit 1739070fb0702451a34608cf0c39c44bf1e09514). I wonder if you could re-test those? ;-) |
Hi Ilya,
Also I wonder if you are changing the pysnmp code, why not just add a new funciton, something like
Then in codegen/pysnmp.py
|
Indeed! Fixed in 1d7ca20.
Yes, this is definitely another legitimate way. I'm leaning towards Does it make sense? Thanks! |
I'm OK with it. Thanks for fixing the problem!. |
Merged, thank you! |
codegen/pysnmp.py
Can generate python script with more than 255 arguments, which make it not working.
This happened to me on ObjectGroup().setObjects() call. But it can happen on other setObjects() calls as well.
Worked around in my case by editing the generated .py file to assign the large tuple directly to ObjectGroup.objects, which takes a tuple and happened to be public member.
RARITAN-PX2-PDU2-MIB.txt
Attached is the MIB file that would cause problem. Line 71 of generated .py contains > 255 arguments.
The text was updated successfully, but these errors were encountered: