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

Missing source MIB #46

Closed
FrogAtGithub opened this issue Mar 27, 2019 · 4 comments
Closed

Missing source MIB #46

FrogAtGithub opened this issue Mar 27, 2019 · 4 comments

Comments

@FrogAtGithub
Copy link

FrogAtGithub commented Mar 27, 2019

Hi,
Using a command prompt with Windows 10, with mibdump.py and MAV3-MIB.mib being in the same folder (C:/sandbox), i am running the following command :

C:\sandbox>mibdump.py MAV3-MIB.mib

It results in the following :

Source MIB repositories: file:///usr/share/snmp/mibs, http://mibs.snmplabs.com/asn1/@mib@
Borrow missing/failed MIBs from: http://mibs.snmplabs.com/pysnmp/notexts/@mib@
Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs
Compiled MIBs destination directory: C:\Users\SESA78282\PySNMP Configuration\mibs
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: MAV3-MIB
Destination format: pysnmp
Custom destination template: None
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: MAV3-MIB
Ignored MIBs:
Failed MIBs:

Could you please help understanding why the MIB appears as missing ?

Thanks
F

@etingof
Copy link
Owner

etingof commented Apr 14, 2019

Sorry for the late answer!

I believe you should use the --mib-source= option to point mibdump to the directory where you have your MIB. Perhaps something like --mib-source=file:///sandbox though you may need to experiment with the URI syntax on Windows.

@mr-sven
Copy link
Contributor

mr-sven commented Aug 27, 2019

Hi, I faced the same problem on Windows. It is caused by urlparse.urlparse in file pysmi/reader/url.py urlparse result for file scheme in windows is leaving a slash at the beginning. Take a look at the following thread at stowfl: https://stackoverflow.com/questions/43911052/urlparse-on-a-windows-file-scheme-uri-leaves-extra-slash-at-start

@etingof
Copy link
Owner

etingof commented Aug 27, 2019

@mr-sven Thanks! If you could push a PR working this around, I'd happily merge it. Otherwise I will address this a bit later.

@etingof
Copy link
Owner

etingof commented Aug 27, 2019

@mr-sven I just added the same thing for Py2 and cherry-picked the entire patch chain to the older branch (0.3.5). Let me know if you need a release.

Thank you and sorry for sluggish responses!

@etingof etingof closed this as completed Aug 27, 2019
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

3 participants