etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
580 stars 200 forks source link

lookupValue issue in hlapi #145

Open lunarspectrum opened 6 years ago

lunarspectrum commented 6 years ago

When using the hlapi nextCmd or getCmd, there is no obvious way of checking of constraints as is possible using lookupValue=False in thepysnmp.entity.rfc3413.oneliner version.

This can make a complete smnpwalk implementation fail. Catching the PySnmpError and allowing it to pass does not allow the completion of the walk. Also, the ValueConstraintError is not raised to the level where it can be caught and handled in the hlapi.

Could a lookupValue keyword be added to the hlapi functions?

etingof commented 6 years ago

That's very reasonable to be able to ignore malformed values and keep on walking. I will look into that.