-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
how to simply iterate column values? #228
Comments
Sounds like if there was a getSubtrees() method/property alongside registerSubtrees(), that would solve this... Meanwhile, could you walk |
Good hint, |
Just to cheer you up, in the upcoming pysnmp5 the documentation will be much better. ;-) |
Good to know. A well sorted collection of code snippets for the SNMP Agent implementation, for example, is certainly very helpful. In particular the iteration and traversing of managed objects is used quite often. |
Thank you for the feedback and suggestions! I am planning to implement that. Two more WIP things that are possibly relevant to agent implementation:
The latter link tries to explain bits of pysnmp 5 (!) SMI model and hooks.
|
Well, the example workflow of the SNMP responder looks promising and is similar to the implementation I've used in my MIB instrumentation. However, I am still going a bit lower and working only on a value basis (get/set), whereas the templating is focused on generating glue code for my JSON-RPC based backend. |
One thing I noticed about your SNMPv2-MIB::sysName.0 managed object example: As far as I see, |
When the OID you query comes down to the Should we turn
Right, Previously,
Because the first way should be able to cover the second. WDYT? If you still need the Sorry if I misread your question. |
Sorry, maybe my question was related to the wrong version. I'm still using pysnmp version 4.4.4, which has no user callbacks in the But my approach also has a flaw because in the end every request has to pass through the methods getValue()/setValue(). That's ok, but only if I access it via the instrument read/write methods. Then the defined callouts to the back-end are invoked as well. But when I try to access the syntax object internally by getting it via This gave me the idea to move the logic regarding back-end access directly into the syntax object. But for this I would have to be able to overwrite methods of the underlying syntax class... |
If you turn |
Meanwhile... Unfortunately, the use of the |
Hi Ilya,
I wonder if there is a simple way to iterate specific columns of a table as an alternative to the following implementation (based on pysnmp v4.4.4)?
A simpler and faster method would be the following:
However, a protected class member is accessed here.
I would appreciate comments or alternative recommendations.
Best regards,
Andreas
The text was updated successfully, but these errors were encountered: