All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Coverage badge added to
docs/index.mdso it appears on the Read the Docs site as well as on GitHub and PyPI.
- Split connect/read timeout: the
timeoutparameter now sets the read timeout; the connect timeout is capped atmin(timeout, 10)seconds so unreachable hosts fail fast without waiting for the full read timeout. Fully transparent — thetimeoutparameter is unchanged. - Larger connection pool:
HTTPAdapteris always mounted withpool_connections=4andpool_maxsize=20, improving throughput for callers that parallelize requests viaThreadPoolExecutor.
- Project homepage in
pyproject.tomlnow points to the Read the Docs documentation site instead of the GitHub repository. - PyPI package description updated to "unofficial Python 3 client" to accurately reflect the project's relationship with OpenNMS.
README.mdanddocs/index.md: library described as an "unofficial client" throughout; live-server validation qualified as read-only only; write mode noted as untested live.- OpenNMS resources block added (Docs, REST API reference, Community forum).
- Read the Docs is now the canonical
DocumentationURL inpyproject.toml; GitHub Pages retained as"API Reference"pointing directly to the rendered method docs. - All user-facing API reference links updated to
readthedocs.io(no personal username in URLs). - Acknowledgements added to
docs/index.mdso they appear on the RTD site as well as on GitHub and PyPI. - RTD badge added to README.
CLAUDE.mdremoved from the source distribution — it is AI developer tooling, not content for package consumers.
py.typedmarker (PEP 561): type checkers (mypy, pyright, Pylance) now automatically discover the package's TypedDicts and annotations without any user configuration.Typing :: TypedPyPI classifier added.- Read the Docs support:
.readthedocs.yamladded for versioned docs at https://opennms-api-wrapper.readthedocs.io. - Security policy:
SECURITY.mdadded with supported-versions table and private disclosure instructions via GitHub Security Advisories.
- Installation docs updated:
pip install opennms-api-wrapper(PyPI) is now the primary install method; stale GitHub tarball URLs removed. - Smoke test environment variables documented in the MkDocs site
(
docs/index.md), not only in the script and README. - Test count removed from all locations except the README features list to reduce maintenance burden.
-
Exception hierarchy: HTTP errors now raise typed exceptions instead of bare
requests.exceptions.HTTPError. All exceptions are exported from the top-level package — no need to importrequestsin calling code.OpenNMSError └── OpenNMSHTTPError (.status_code, .response) ├── BadRequestError 400 ├── AuthenticationError 401 ├── ForbiddenError 403 ├── NotFoundError 404 ├── ConflictError 409 └── ServerError 5xx -
Pagination helper:
client.paginate(method, key, page_size=100, **kwargs)— a generator that transparently handleslimit/offsetpagination and yields individual items from any list endpoint.
- TypedDict payload schemas:
opennms_api_wrapper.typesnow exportsTypedDictclasses covering every write-method argument. Schemas appear in IDE autocompletion and in the API docs; all fields are optional (total=False) for maximum flexibility. Hyphenated v1 keys (e.g.,foreign-id,node-label) use functionalTypedDict(...)syntax; all other schemas use class syntax for full IDE autocompletion. - MkDocs Material docs site: replaced pdoc with MkDocs Material +
mkdocstrings.
mkdocs.yml,docs/index.md, anddocs/api.mdadded. GitHub Pages workflow updated; all public methods and TypedDict schemas are now rendered at https://cnewkirk.github.io/opennms-api-wrapper/api/. - Retry with exponential backoff: HTTP client now retries on connection
errors and transient server errors (500, 502, 503, 504) with exponential
backoff (0.5 s factor, up to 3 retries by default). Uses urllib3's built-in
Retry— no new dependencies. Passretries=0to disable. - Smoke test: deeper drill-down coverage for nodes (single IP interface, SNMP interface, category, service), requisition nodes (interfaces, categories, assets), foreign source detectors/policies, business services, enlinkd link types/elements, classifications, eventconf sources, SCV credentials, and config management schemas.
- New unit tests for eventconf file upload (from path and from bytes).
- 7 new retry configuration tests (
test_retries.py).
- Mixin methods now pass empty
params={}directly instead of usingparams={} or None;requestshandles empty dicts correctly and this removes a subtle footgun. _eventconf.py: refactored to use_post_files(),_post_text(), and_get_text()base helpers instead of raw_sessioncalls._classifications.py:import_classification_rules_csv()refactored to use_post_text().- ADR-010 updated from "No retry" to "Retry with exponential backoff".
- Near-complete OpenNMS REST API coverage: 24 new endpoint groups with ~150 new public methods, closing all Tier 1 (core ops), Tier 2 (feature-specific), and Tier 3 (config/admin) API gaps.
- New Tier 1 mixins: monitoring locations, minions, ifservices, availability, health, whoami.
- New Tier 2 mixins: classifications, situation feedback, user-defined links (v2), applications (v2), perspective poller (v2), foreign sources config, requisition names, SNMP metadata (v2), provisiond (v2), event configuration (v2), monitoring systems, asset suggestions.
- New Tier 3 mixins: secure credentials vault (SCV), configuration management, SNMP trap NBI config, email NBI config, syslog NBI config, javamail config.
- Extended existing mixins: prefab graph methods (+4), flow DSCP and graph URL (+4), business service edges/functions/daemon reload (+10).
_patch()HTTP helper in base class for PATCH requests (used by eventconf enable/disable)._delete()now accepts optionaljson_dataparameter (used by eventconf bulk delete).- 463-test suite (up from 301), all passing.
- Smoke test sections for all new endpoint groups (140 total checks, up from ~80).
- Validated against OpenNMS Meridian 2024.3.0 (106 passed, 0 failed, 25 warned).
- Accept header now includes
text/plain;q=0.9to prevent 406 errors on/countendpoints in some OpenNMS versions. get_node_count()uses the v2 API (GET /api/v2/nodes?limit=1) and extractstotalCount. The v1/rest/nodesendpoint does not expose a/countsub-resource.
- Smoke test: endpoints that depend on optional plugins (alarm history, hardware inventory, flows, situations) or heavy queries (resources) now report as WARN instead of FAIL. Each warning cites the required plugin or feature.
- Smoke test: events query filters by lowest-ID node to avoid full table scans on large databases.
- Smoke test:
--skipflag to skip tests by label prefix (e.g.,--skip get_flowskips all flow tests). - Smoke test:
OPENNMS_TIMEOUTenv var (default 60 seconds). - Validated against OpenNMS Meridian 2024.3.0 (65 passed, 0 failed).
- Initial release covering all OpenNMS Horizon 35 REST API endpoints (v1 and v2).
- Single
OpenNMSclient class importable asimport opennms_api_wrapper as opennms. - JSON-only request/response handling throughout; no XML dependency.
- Synchronous, dependency-minimal design (only
requestsrequired at runtime). - 290-test suite with full method coverage; HTTP mocked at the adapter level
using the
responseslibrary — no live server required to run tests. - Resource groups covered: alarms, alarm statistics, alarm history, events, nodes (with IP interfaces, SNMP interfaces, monitored services, categories, assets, and hardware inventory), outages, notifications, acknowledgements, requisitions, foreign sources, SNMP configuration, groups, users, categories, scheduled outages, KSC reports, resources, measurements, heatmap, maps, topology graphs, flows, device configuration, situations (v2), business services (v2), metadata (v2), server info, discovery (v2), and global IP/SNMP interface views (v2).