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

build-pysnmp-mib versus mibdump.py #21

Closed
truthadjustr opened this issue Dec 20, 2017 · 1 comment
Closed

build-pysnmp-mib versus mibdump.py #21

truthadjustr opened this issue Dec 20, 2017 · 1 comment

Comments

@truthadjustr
Copy link

truthadjustr commented Dec 20, 2017

What I thought as the older obsolete tool, was able to convert my MIB file to its .py equivalent:

build-pysnmp-mib -o MYMIB.py MYMIB.mib

Whereas, the newer mibdump.py gave an error:

mibdump.py --destination-format=pysnmp --destination-directory=`pwd` ./MYMIB.mib                                                                                                                                           
...
MIBs excluded from code generation: INET-ADDRESS-MIB, PYSNMP-USM-MIB, RFC-1212, RFC-1215, RFC1065-SMI, RFC1155-SMI, RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-MIB, SNMP-TARGET-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-ADDRESS-MIB
MIBs to compile: MYMIB
Destination format: pysnmp
Parser grammar cache directory: not used
Also compile all relevant MIBs: yes
Rebuild MIBs regardless of age: no
Dry run mode: no
Create/update MIBs: yes
Byte-compile Python modules: yes (optimization level no)
Ignore compilation errors: no
Generate OID->MIB index: no
Generate texts in MIBs: no
Keep original texts layout: no
Try various file names while searching for MIB module: yes
Created/updated MIBs: 
Pre-compiled MIBs borrowed: 
Up to date MIBs: 
Missing source MIBs: 
Ignored MIBs: 
Failed MIBs: MYMIB (Bad grammar near token type LOWERCASE_IDENTIFIER, value rfnSiemRogueApDetectorTableEntry at MIB MYMIB, line 75)

Is there something wrong in the MIB or in mibdump.py?

@etingof
Copy link
Owner

etingof commented Dec 20, 2017

I believe rfnSiemRogueApDetectorTableEntry should start with a capital letter to be compliant with the SMI language. Is it your own MIB you are designing or is it a bug in some vendor MIB?

I would not use build-pysnmp-mib because libsmi-generated Python code used to be flawed in many ways. :(

@etingof etingof closed this as completed Feb 25, 2018
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

No branches or pull requests

2 participants