feat!: report the subscription as a license, not a warning (0.4.0) #26

Merged
christianmanivong merged 1 commits from feat/facts-not-warnings into master 2026-10-17 08:34:56 +00:00
Owner

Drops get_device_warnings; netOrk names the warnings from facts (NetOrk/netork#1146, NetOrk/netork#1111).

  • lldpd and the pending updates were already facts (get_packages, get_available_updates); netOrk rebuilds updates_available from the full list anyway.
  • The subscription is now get_licenses() (napalm-device-types 4.14 LicenseMixin): one pve-subscription entry, the API status mapped case-insensitively (notfound → none, active, invalid, expired; new/suspended → unknown), the API message as detail, product name and due date when subscribed. An unreadable subscription reports nothing.

Behaviour note: the old check compared against NotFound, while the API answers notfound — read live from all four nodes on the test server — so no_subscription never fired. Reported faithfully, netOrk's rule would now raise it (info, standing) on those nodes.

Requires napalm-device-types >= 4.14.0.

Part of #24

Drops `get_device_warnings`; netOrk names the warnings from facts (NetOrk/netork#1146, NetOrk/netork#1111). - lldpd and the pending updates were already facts (`get_packages`, `get_available_updates`); netOrk rebuilds `updates_available` from the full list anyway. - The subscription is now `get_licenses()` (napalm-device-types 4.14 `LicenseMixin`): one `pve-subscription` entry, the API status mapped case-insensitively (`notfound` → `none`, `active`, `invalid`, `expired`; `new`/`suspended` → `unknown`), the API message as `detail`, product name and due date when subscribed. An unreadable subscription reports nothing. **Behaviour note:** the old check compared against `NotFound`, while the API answers `notfound` — read live from all four nodes on the test server — so `no_subscription` never fired. Reported faithfully, netOrk's rule would now raise it (info, standing) on those nodes. Requires napalm-device-types >= 4.14.0. Part of #24
christianmanivong added 1 commit 2026-10-17 07:36:35 +00:00
feat!: report the subscription as a license, not a warning (0.4.0)
CI / test (3.10) (push) Successful in 33s
CI / test (3.11) (push) Successful in 30s
CI / test (3.12) (push) Successful in 35s
CI / test (3.10) (pull_request) Successful in 32s
CI / test (3.11) (pull_request) Successful in 31s
CI / test (3.12) (pull_request) Successful in 34s
1100560f85
get_device_warnings is gone; netOrk names the warnings from facts
(netOrk #1111). lldpd and the pending updates were already facts
(get_packages, get_available_updates). The subscription is now
get_licenses() from napalm-device-types 4.14's LicenseMixin: one
pve-subscription entry, the API status mapped to a LicenseStatus.

The old check compared against "NotFound" while the API answers
"notfound" (seen on all four nodes), so it never fired; the mapping is
case-insensitive.
christianmanivong merged commit d134ccbb89 into master 2026-10-17 08:34:56 +00:00
christianmanivong deleted branch feat/facts-not-warnings 2026-10-17 08:34:56 +00:00
Sign in to join this conversation.