fix: BSD hosts in the role bsd, OpenBSD CPU unknown (#10, #7) #26

Merged
christianmanivong merged 4 commits from fix/bsd-role-and-cpu into main 2026-11-02 00:03:02 +00:00
Owner

Two decisions on #10 and #7, one commit each.

  • fix: FreeBSD and OpenBSD hosts report the role bsd (ROLE = "bsd" on BsdDriver) instead of inheriting linux (#10). netOrk accepts bsd wherever it accepted linux (poll budget, SNMP standard reading, Lynis, OS tabs) in a matching netOrk change.
  • fix(openbsd): SNMP_HEALTH_PROFILE = {"cpu": {"unknown": True}} — netOrk reports no CPU figure for OpenBSD instead of 100 % (#7). FreeBSD keeps the standard reading.

Depends on napalm-device-types feat/health-profile-unknown (SnmpValueSpec.unknown). Raise the device-types floor to the release containing it before merging (mypy: Extra key "unknown" against the old contract; napalm_bsd.openbsd is still under ignore_errors, so CI would not catch it).

Tested: fixtures only (test_the_role_is_bsd_not_linux, test_openbsd_cpu_is_unknown, both failed first). pytest 151 passed, ruff, mypy clean.

Closes #10
Closes #7

Two decisions on #10 and #7, one commit each. - `fix`: FreeBSD and OpenBSD hosts report the role `bsd` (`ROLE = "bsd"` on `BsdDriver`) instead of inheriting `linux` (#10). netOrk accepts `bsd` wherever it accepted `linux` (poll budget, SNMP standard reading, Lynis, OS tabs) in a matching netOrk change. - `fix(openbsd)`: `SNMP_HEALTH_PROFILE = {"cpu": {"unknown": True}}` — netOrk reports no CPU figure for OpenBSD instead of 100 % (#7). FreeBSD keeps the standard reading. **Depends on** napalm-device-types `feat/health-profile-unknown` (`SnmpValueSpec.unknown`). Raise the device-types floor to the release containing it before merging (mypy: `Extra key "unknown"` against the old contract; `napalm_bsd.openbsd` is still under `ignore_errors`, so CI would not catch it). Tested: fixtures only (`test_the_role_is_bsd_not_linux`, `test_openbsd_cpu_is_unknown`, both failed first). pytest 151 passed, ruff, mypy clean. Closes #10 Closes #7
christianmanivong added 2 commits 2026-11-01 21:20:17 +00:00
BsdDriver set no ROLE, so both drivers inherited OSDriver's "linux"
and an application that shows or branches on the role treated a BSD
host as a Linux one. One key for both systems.

Closes #10
fix(openbsd): declare the CPU unknown in the SNMP health profile
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Failing after 4s
driver / test (3.12) (pull_request) Successful in 55s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m10s
CI / driver (pull_request) Failing after 2m27s
driver / publish (pull_request) Skipped
86cdde03bf
net-snmp on OpenBSD answers ssCpuIdle with 0 on an idle host (and
hrProcessorLoad with 100), so a reading of the standard OID shows every
OpenBSD host at 100 % CPU. The profile now marks the CPU unknown, and
the application reports no figure instead of a wrong one. Memory, swap
and load stay on the standard reading.

Closes #7
christianmanivong added 2 commits 2026-11-01 23:58:01 +00:00
# Conflicts:
#	CHANGELOG.md
chore(deps): floor napalm-device-types at 4.23.0
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m8s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m50s
driver / publish (pull_request) Skipped
ccce4a8406
4.23.0 is on PyPI with everything this branch uses; the git pre-install
in CI is no longer needed.
christianmanivong merged commit fc3cade13a into main 2026-11-02 00:03:02 +00:00
christianmanivong deleted branch fix/bsd-role-and-cpu 2026-11-02 00:03:02 +00:00
Sign in to join this conversation.