Closed etingof closed 5 years ago
Merging #44 into master will decrease coverage by
0.38%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #44 +/- ##
==========================================
- Coverage 74.45% 74.07% -0.39%
==========================================
Files 31 31
Lines 2368 2368
==========================================
- Hits 1763 1754 -9
- Misses 605 614 +9
Impacted Files | Coverage Δ | |
---|---|---|
pysmi/codegen/pysnmp.py | 93.1% <100%> (ø) |
:arrow_up: |
pysmi/error.py | 80.55% <0%> (-11.12%) |
:arrow_down: |
pysmi/reader/zipreader.py | 78.37% <0%> (-3.61%) |
:arrow_down: |
pysmi/parser/smi.py | 81.03% <0%> (-0.18%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 13174c7...1fd0799. Read the comment docs.
Refactor pysnmp code generation templates to generate Managed Objects Instances alone and with management instrumentation hooks.
The intention here is to automate pysnmp-based SNMP agents implementation by generating the boilerplate extension points where user calls to the actual data sources could be hooked up.
Implementation-wise, Jinja2 templates being used for pysnmp code generation have been overhauled to align better with this two-purpose design i.e. being able to generate just MIB definitions (for MIB browsing purposes) and MIB instrumentation. The latter can be generated in two variants:
MibObjectInstance
classes, that user is expected to complete and uncomment, orMibScalarObject
/MibTableColumn
classes which reside at the higher level in the MIB tree therefore potentially providing more flexibility to the implementationIn both cases above MIB instrumentation hooks are being generated to interface with the actual user data source.
As it stands now, generated
ManagedObjectInstance
s are not actually instantiated and exported from the MIB module - the user is expected to provide proper OID and/or value prior to uncommenting the generated snippets.