OpenWrtDriver mixes in napalm-device-types' HostStatusMixin, and _run_host_status_command runs the command over an SSH exec channel (run_command). The command is longer than the 512 characters BusyBox ash takes on a typed line.
The router now reports:
whether it needs a reboot (one kernel under /lib/modules, so normally no);
how full its filesystems are (/ is the overlay);
with napalm-device-types 4.32 (NAPALM/napalm-device-types#98), whether apk (OpenWrt 25.12) or opkg (before 25.12) was left halfway, and which of the two it read.
No floor bump. HostStatusMixin exists in the current floor (4.27). The apk/opkg reading comes with the newer device-types.
Why
NetOrk/netork#851: netOrk warns about an interrupted apk and finishes an interrupted opkg (opkg configure) before an update. On OpenWrt it could not see either, because the driver had no host status.
Note for the application: the filesystem reading is new for OpenWrt too, so a router whose overlay is 90 % full or more will get netOrk's "volume almost full" warning.
Tests
Fixtures only. The report is shaped after what the command prints on OpenWrt 25.12, and still has to be checked against a real router. The tests cover two things: the reading is device-types' parse of what the router printed, and the command goes over an exec channel, not the interactive shell. They pass against both napalm-device-types 4.31.1 and the PR above. ruff and mypy are clean.
## What
`OpenWrtDriver` mixes in napalm-device-types' `HostStatusMixin`, and `_run_host_status_command` runs the command over an SSH exec channel (`run_command`). The command is longer than the 512 characters BusyBox ash takes on a typed line.
The router now reports:
- whether it needs a reboot (one kernel under `/lib/modules`, so normally no);
- how full its filesystems are (`/` is the overlay);
- with napalm-device-types 4.32 (NAPALM/napalm-device-types#98), whether apk (OpenWrt 25.12) or opkg (before 25.12) was left halfway, and which of the two it read.
No floor bump. `HostStatusMixin` exists in the current floor (4.27). The apk/opkg reading comes with the newer device-types.
## Why
NetOrk/netork#851: netOrk warns about an interrupted apk and finishes an interrupted opkg (`opkg configure`) before an update. On OpenWrt it could not see either, because the driver had no host status.
Note for the application: the filesystem reading is new for OpenWrt too, so a router whose overlay is 90 % full or more will get netOrk's "volume almost full" warning.
## Tests
Fixtures only. The report is shaped after what the command prints on OpenWrt 25.12, and still has to be checked against a real router. The tests cover two things: the reading is device-types' parse of what the router printed, and the command goes over an exec channel, not the interactive shell. They pass against both napalm-device-types 4.31.1 and the PR above. ruff and mypy are clean.
Refs NetOrk/netork#851
The router's host status, read by napalm-device-types' command over an
SSH exec channel: whether it needs a reboot, how full its filesystems
are, and, with napalm-device-types 4.32, whether apk or opkg was left
halfway.
Refs NetOrk/netork#851
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
OpenWrtDrivermixes in napalm-device-types'HostStatusMixin, and_run_host_status_commandruns the command over an SSH exec channel (run_command). The command is longer than the 512 characters BusyBox ash takes on a typed line.The router now reports:
/lib/modules, so normally no);/is the overlay);No floor bump.
HostStatusMixinexists in the current floor (4.27). The apk/opkg reading comes with the newer device-types.Why
NetOrk/netork#851: netOrk warns about an interrupted apk and finishes an interrupted opkg (
opkg configure) before an update. On OpenWrt it could not see either, because the driver had no host status.Note for the application: the filesystem reading is new for OpenWrt too, so a router whose overlay is 90 % full or more will get netOrk's "volume almost full" warning.
Tests
Fixtures only. The report is shaped after what the command prints on OpenWrt 25.12, and still has to be checked against a real router. The tests cover two things: the reading is device-types' parse of what the router printed, and the command goes over an exec channel, not the interactive shell. They pass against both napalm-device-types 4.31.1 and the PR above. ruff and mypy are clean.
Refs NetOrk/netork#851