etingof / pysmi

SNMP MIB parser
http://snmplabs.com/pysmi/
BSD 2-Clause "Simplified" License
137 stars 52 forks source link

MIB file fails to parse #57

Closed njsell closed 4 years ago

njsell commented 4 years ago

I have a MIB file provided from the manufacturer that fails when running mibdump.py. The error I get is: Failed MIBs: RMB2BBR (Bad grammar near token type MODULE_IDENTITY, value MODULE-IDENTITY at MIB RMB2BBR, line 24)

Can you help me resolve this?

Here is the offending file RMB2BBR.txt

etingof commented 4 years ago

Perhaps that MIB does not quite follow SMI naming conventions. For example, MODULE-IDENTITY should start low-cased. Then DESCRIPTION field is missing.

Anyway, here's the version MODULE-IDENTITY that works for me:

eNP_AC_VRC MODULE-IDENTITY
        LAST-UPDATED "201309020955Z"
        ORGANIZATION "EMERSON NETWORK POWER (ENPC)"
        CONTACT-INFO "EMERSON NETWORK POWER"
        DESCRIPTION  "module description"
        REVISION     "200502180000Z"
        DESCRIPTION
            "EMERSON NETWORK POWER (ENPC) For RDU-SIC G2 MIB."
        ::= { products 381 }

There is some duplicate symbol error later on. Heh, vendors...

njsell commented 4 years ago

Yes, that fixed it for me. Thanks!