Removes the custom MIB dependency resolution and compiler logic and makes PySNMP do the heavy lifting. PySNMP will compile the MIBs on demand, including dependency resolution.
The previous MIB compilation logic was broken: missing files were correctly compiled, but the compiled files were (by default) put into a directory that wasn't actually searched by PySNMP.
The following lines in CommandResponder are the most relevant change in this PR. They replace the custom logic in build_pysnmp_mib_wrapper.py.
There was no indication (outside of --verbose) when a symbol from the template configuration was skipped. You were left wondering why nothing would show up in snmpwalk. This produces a warning now.
DeprecationWarnings in the old code are fixed... since the code doesn't exist any more.
Fixed a parsing error in the IEC104 template's SNMP config.
Other functional changes:
Removed --raw_mib. Bundle the files inside the template instead, e. g. conpot/templates/foobar/snmp/mibs/my.mib.
Renamed --mibpaths to the more appropriate --mibcache. This now falls back to PySNMP's default of ~/.pysnmp/mibs, though I have opened an issue that this would be more appropriate under ~/.cache.
Removed SNMP-related dependencies from the installation docs and from Travis. Those appear to be obsolete.
Removes the custom MIB dependency resolution and compiler logic and makes PySNMP do the heavy lifting. PySNMP will compile the MIBs on demand, including dependency resolution.
The previous MIB compilation logic was broken: missing files were correctly compiled, but the compiled files were (by default) put into a directory that wasn't actually searched by PySNMP.
The following lines in
CommandResponder
are the most relevant change in this PR. They replace the custom logic inbuild_pysnmp_mib_wrapper.py
.Other minor changes:
--verbose
) when a symbol from the template configuration was skipped. You were left wondering why nothing would show up insnmpwalk
. This produces a warning now.Other functional changes:
--raw_mib
. Bundle the files inside the template instead, e. g.conpot/templates/foobar/snmp/mibs/my.mib
.--mibpaths
to the more appropriate--mibcache
. This now falls back to PySNMP's default of~/.pysnmp/mibs
, though I have opened an issue that this would be more appropriate under~/.cache
.