English 中文(简体)
我的MIB档案符合类型的LOWE RCASE_IDENTIFIER p
原标题:parse my MIB file met type LOWE RCASE_IDENTIFIER error in pySmi
  • 时间:2023-05-17 15:35:37
  •  标签:
  • pysnmp
  • mib

I met a problem in PySMI when parse a min file to a json file.

I turn on the debug mode. The issue is occur in 671 Line

2023-05-17 23:05:47,064 pysmi: failing on error Bad grammar near token type LOWE
RCASE_IDENTIFIER, value lldpinfo at MIB HH3C-SERVER-AGENT-MIB, line 671 from Fil
eReader{"."}                                                                  

在MIB档案中


    hh3cNetWorkLldpInfoTable    OBJECT-TYPE
        SYNTAX      SEQUENCE  OF  hh3cNetWorkLldpInfoEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "The network LLDP information table."
        ::=  { hh3cNetwork  2 }

    hh3cNetWorkLldpInfoEntry    OBJECT-TYPE
        SYNTAX      hh3cNetWorkLldpInfoEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "Row Description"
        INDEX       {  hh3cLldpInfoIndex  }
        ::=  { hh3cNetWorkLldpInfoTable 1 }

    hh3cNetWorkLldpInfoEntry  ::=  SEQUENCE {
        hh3cLldpInfoIndex  Integer,
        hh3cLldpInterfaceName  DisplayString,
        hh3cLldpInfoChassisMac  DisplayString,
        hh3cLldpInfoChassisName  DisplayString,
        hh3cLldpInfoPortName  DisplayString,
        hh3cLldpInfoPortDescr  DisplayString,
        hh3cLldpInfoVlanID  Integer
        }

在MIB档案或PySMI中有哪些错误?

在MIB档案或PySMI中有哪些错误?

问题回答

正确做法应当照相。


    hh3cNetWorkLldpInfoTable    OBJECT-TYPE
        SYNTAX      SEQUENCE  OF  Hh3cNetWorkLldpInfoEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "The network LLDP information table."
        ::=  { hh3cNetwork  2 }

    hh3cNetWorkLldpInfoEntry    OBJECT-TYPE
        SYNTAX      Hh3cNetWorkLldpInfoEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "Row Description"
        INDEX       {  hh3cLldpInfoIndex  }
        ::=  { hh3cNetWorkLldpInfoTable 1 }

    Hh3cNetWorkLldpInfoEntry  ::=  SEQUENCE {
        hh3cLldpInfoIndex  Integer,
        hh3cLldpInterfaceName  DisplayString,
        hh3cLldpInfoChassisMac  DisplayString,
        hh3cLldpInfoChassisName  DisplayString,
        hh3cLldpInfoPortName  DisplayString,
        hh3cLldpInfoPortDescr  DisplayString,
        hh3cLldpInfoVlanID  Integer
        }

因此,PySMI抱怨了这辆车。





相关问题
Resources to build SNMP support for my device?

Can any one recommend resources for adding SNMP support for my device? my understanding the steps I need to do are as follow: Create a MIB file that define what values your MIB will support Use code ...

PHP MIB to OID resolve

I m googling around for a couple of days, and can t find clear method/lib for resolving OID from MIB name, and MIB from OID. I ve found few sites that have a large MIB database, search functions ie. ...

net-snmp: force table to have xxEntry value of 2 instead of 1

Using net-snmp, table code generated by mib2c -c mib2c.iterate.conf fooBarTable and then heavily hacked. Unfortunately the table is defined with an Entry of 2 instead of the normal 1. (I didn t do ...

Fetching entire branch of MIB

I m still quite new to SNMP and I was wondering how I would go about getting an entire branch of a MIB with as few queries as possible. My approach: Use GETBULK messages to get pow(2,tries) entries ...

Java Getting Name/Description for OIDs in MIB

I am programming a network management system, and need to be able to print out meaningful names behind the OIDs that are received from SNMP traps. Due to the nature/size of this system, it would not ...

Definition of SNMP Gauge32 vs Counter32

Can someone point me to a good definition of Gauge32 vs Counter32? I understand that Counter32 can wrap, but Gauge32 can t. I m trying to understand their semantics. For example, I ve heard you ...

net-snmp MIB parse error - "Group not found in module"

When I try to load the Avaya Lannet-Trapsv2-MIB in net-snmp, it is giving the following parse error: Group not found in module (lntSecurityNotificationGroup): At line 1311 in C:/net-snmp/share/snmp/...

热门标签