feat(20-02): add parse-mib and test-profile API endpoints

- POST /snmp-profiles/parse-mib: upload MIB file, subprocess-call tod-mib-parser, return OID tree JSON
- POST /snmp-profiles/{id}/test: test profile connectivity via NATS discovery probe to poller
- New snmp_proxy service module following routeros_proxy.py lazy NATS pattern
- Pydantic schemas: MIBParseResponse, ProfileTestRequest, ProfileTestResponse, ProfileTestOIDResult
- MIB_PARSER_PATH config setting with /app/tod-mib-parser default
- MIB parse errors return 422, not 500; temp file cleanup in finally block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-21 20:21:08 -05:00
parent 77e9b680ae
commit 655f1eadae
7 changed files with 412 additions and 28 deletions

View File

@@ -139,6 +139,9 @@ class Settings(BaseSettings):
# Commercial license required above this limit.
LICENSE_DEVICES: int = 250
# MIB parser binary path (tod-mib-parser Go binary)
MIB_PARSER_PATH: str = "/app/tod-mib-parser"
# App settings
APP_NAME: str = "TOD - The Other Dude"
APP_VERSION: str = "9.7.2"