tsnmp consumes compiled JSON artifacts only. It does not compile raw MIB files
and it does not import trishul-smi at runtime.
Bundles provide optional symbolic translation and display enrichment.
Core SNMP manager operations work without bundles. Bundles add:
load_bundle(path) accepts:
IF-MIB.jsonA single module JSON file is a valid degenerate bundle.
| Artifact | Required | Role |
|---|---|---|
Module JSON (IF-MIB.json) |
yes | Source of truth for module, object, and type metadata |
manifest.json |
no | Optional inventory sidecar for deterministic directory discovery |
oid_index.json |
no | Optional reverse-OID lookup accelerator |
The runtime must work when only a single compiled module JSON file is provided. Directory sidecars improve discovery or performance, but they do not define correctness.
If manifest.json is present:
If manifest.json is absent:
tsnmp scans *.json files in the directorymanifest.json and oid_index.json are ignored as module candidatesIf oid_index.json is present:
If oid_index.json is absent:
On load, tsnmp validates:
module and generated_byMalformed artifacts raise BundleValidationError.
Bundles can still load even if referenced dependency modules are missing.
Effect:
This is deliberate. Missing compiled dependencies should not break the runtime
core when the caller intentionally loads a narrow subset such as IF-MIB.json.
tsmiThe split is intentional:
tsnmp
Runtime, transport, manager API, CLI, optional enrichment consumertsmi
Parser/compiler that produces compiled JSON artifactstsnmp consumes JSON artifacts only. It does not import or invoke trishul-smi
at runtime.
Current v0.1 behavior targets the tested tsmi JSON shape.
Still intentionally limited:
If support for non-tsmi JSON schemas adds clear runtime value later, it should
land as an explicit adapter contract rather than ambiguous best-effort ingestion.
Single module JSON:
from trishul_snmp import load_bundle
bundle = load_bundle("./IF-MIB.json")
Directory bundle:
from trishul_snmp import load_bundle
bundle = load_bundle("./mibs-json")