Fix actions become template steps; drop apt_proxy_url, the sudo hint and apt_update_upgrade #27

Closed
opened 2026-10-14 08:22:58 +00:00 by christianmanivong · 0 comments
Owner

run_device_action (linux.py ~1943) dispatches four of the application's remediations:

  • fix_snmp (~1989): installs net-snmp and writes a fixed config (rocommunity public, sysLocation Managed by netOrk, sysContact netork@localhost). It works out the caller's address with ss | awk '/sshd/' and opens ufw for its /24 "so all containers in the same Docker network can probe".
  • fix_apt_proxy (~2130) writes the URL passed in as optional_args["apt_proxy_url"].
  • fix_docker_permissions (~2120).
  • apt_update_upgrade (~1955) has no caller. Delete it.

Also _SUDO_PASSWORD_HINT (~173) is UI text of the application ("…add the sudo password to a Credential Profile…"). Raise a typed error instead.

Change: implement the steps of the device-types templates (configure_snmp_agent, configure_package_proxy, grant_container_engine_access, ensure_package), in napalm-unix where they are POSIX-wide. Values come from the caller. Then remove run_device_action and the apt_proxy_url argument. napalm-openmediavault and napalm-qnap-qts inherit LinuxDriver and are affected.

Needs NAPALM/napalm-device-types#33.

Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types docs/STRUCTURE.md (branch docs/structure-plan).

Prio P3.

`run_device_action` (`linux.py` ~1943) dispatches four of the application's remediations: - `fix_snmp` (~1989): installs net-snmp and writes a fixed config (`rocommunity public`, `sysLocation Managed by netOrk`, `sysContact netork@localhost`). It works out the caller's address with `ss | awk '/sshd/'` and opens ufw for its /24 "so all containers in the same Docker network can probe". - `fix_apt_proxy` (~2130) writes the URL passed in as `optional_args["apt_proxy_url"]`. - `fix_docker_permissions` (~2120). - `apt_update_upgrade` (~1955) has no caller. Delete it. Also `_SUDO_PASSWORD_HINT` (~173) is UI text of the application ("…add the sudo password to a Credential Profile…"). Raise a typed error instead. **Change:** implement the steps of the device-types templates (`configure_snmp_agent`, `configure_package_proxy`, `grant_container_engine_access`, `ensure_package`), in napalm-unix where they are POSIX-wide. Values come from the caller. Then remove `run_device_action` and the `apt_proxy_url` argument. napalm-openmediavault and napalm-qnap-qts inherit `LinuxDriver` and are affected. Needs NAPALM/napalm-device-types#33. Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types `docs/STRUCTURE.md` (branch `docs/structure-plan`). Prio P3.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-linux#27