feat: report where an update comes from and whether it is a security fix, refresh the index, read the host status #11

Merged
christianmanivong merged 1 commits from feat/update-origin-host-status into master 2026-10-05 22:20:08 +00:00
Owner

For netOrk MVP 5. Builds on NAPALM/napalm-device-types#6 (2.3.0). The commit message has the details.

Checked against real hosts (netOrk test server)

The new driver code was loaded into the engine container and run against live hosts:

  • Ubuntu 24.04 ×2: updates with origin, host status (reboot required on z2m-garden, patches itself).
  • Raspberry Pi OS: reads correctly now; it failed on terminal codes before the pipe.
  • OpenMediaVault: reads correctly now; netmiko had stopped at ESC >.
  • vault-01: refresh_available_updates() reported success: false with apt's BADSIG message. That is a problem on the host, and the driver shows it correctly.

Tests (no CI in this repo, run locally)

$ PYTHONPATH=.:../napalm-device-types pytest -q tests
111 passed

ruff and mypy report nothing new against master (mypy: 89 findings instead of 91).

For netOrk MVP 5. Builds on NAPALM/napalm-device-types#6 (2.3.0). The commit message has the details. ## Checked against real hosts (netOrk test server) The new driver code was loaded into the engine container and run against live hosts: - Ubuntu 24.04 ×2: updates with `origin`, host status (reboot required on z2m-garden, patches itself). - Raspberry Pi OS: reads correctly now; it failed on terminal codes before the pipe. - OpenMediaVault: reads correctly now; netmiko had stopped at `ESC >`. - vault-01: `refresh_available_updates()` reported `success: false` with apt's BADSIG message. That is a problem on the host, and the driver shows it correctly. ## Tests (no CI in this repo, run locally) ``` $ PYTHONPATH=.:../napalm-device-types pytest -q tests 111 passed ``` ruff and mypy report nothing new against `master` (mypy: 89 findings instead of 91).
christianmanivong added 1 commit 2026-10-05 22:20:07 +00:00
For netOrk MVP 5, on napalm-device-types 2.3.0:

- get_available_updates (apt) runs the shared APT_UPGRADABLE_COMMAND and
  parse_apt_upgradable: origin and security from apt's suites, and a
  ValueError instead of [] when apt failed or its output was cut short.
- dnf/yum: check-update's exit status decides (0 none, 100 updates, anything
  else raises); security comes from `updateinfo list --security`, and is None
  when dnf cannot say. The repository column becomes the origin.
- refresh_available_updates(): apt-get update, dnf/yum makecache, apk update;
  pacman is left out (-Sy without -u invites a partial upgrade).
- HostStatusMixin: reboot required and self-patching, read over SSH.
- _run_privileged(): root runs directly, a sudo password goes through _sudo,
  otherwise sudo -n. Shared by service control and the refresh.
- _split_status() drops terminal codes before it looks for the exit status;
  a pseudo-terminal left keypad codes in front of the marker.

OpenMediaVault inherits all of it.
christianmanivong merged commit b49acb8ed7 into master 2026-10-05 22:20:08 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-linux#11