-
-
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
Auto generating python code from MIBs #75
Comments
What SNMP MIB does is that it describes the objects which can be managed via SNMP. It's partially for human beings, partially for the tools to produce better representation of the managed objects (again, for the humans). Having said that, can you please elaborate what exactly you want to do with SNMP? How the ultimate product would look like? |
Thanks for the response. I'll elaborate more on what we're trying to do: From Brocade Communications we have our netconf based library https://pypi.python.org/pypi/pyswitchlib. This is our currently library to talk to our devices for Get/Set/Delete operations. The current ask is to include support for legacy devices as well, which dont support netconf. These devices have decent support for SNMP mibs and if SNMP support isnt there we would have to go CLI scraping. The above mentioned library helps drive our Automation tools and hence we want to see if the pyswitchlib library can be extended to include SNMP support as well. |
Sorry for delay! I think it should definitely be possible to add SNMP support to the above mentioned library. Typically, what you have to do is to call SNMP manager implementation asking it to GET or SET certain object at the device being managed. The objects available and their semantics are described in MIB files. User is presented with human-friendly descriptions which objects are manageable so they could do something about them. To give you a better answer I think I still need more context -- what kind of automation you are looking for? Can you give me an example? BTW, if you think I can help you with the implementation - drop me an e-mail. ;-) |
This is not really an issue and more of a question where I'd like to get your opinion. We have a couple of MIB files that contain all the MIBs that are used in the product. Unfortunately this is one of our older products and hence there isnt any other API/Netconf models that we can use.
The goal is to write up a python library using SNMP/CLI to make it easier for users to consume it for network automation.
So the key question is how do we speed up the process of coding up the python library and is it possible to auto generate a bunch of code for use by others? We've done this for other devices where Netconf support is much better, using pyangbind.
I've been able to use mibdump.py to generate the python files for the mibs but am not sure if they're really usable.
Sample of the IF-MIB.py
The text was updated successfully, but these errors were encountered: