Move the _run_*_command hooks onto run_command #22

Open
opened 2026-10-08 06:58:58 +00:00 by christianmanivong · 1 comment
Owner

Several mixins ask their driver for a command hook of their own (_run_service_command, _run_listening_sockets_command, ...). Since 2.6.0 there is a public channel, run_command(command, *, privileged, timeout, stdin), with a real exit code and sudo handled once. The hooks could become calls to run_command where a driver offers it, so a driver implements one channel instead of one hook per feature.

Follow-up of NetOrk/netork#765 (its plan, phase 9).

Several mixins ask their driver for a command hook of their own (`_run_service_command`, `_run_listening_sockets_command`, ...). Since 2.6.0 there is a public channel, `run_command(command, *, privileged, timeout, stdin)`, with a real exit code and sudo handled once. The hooks could become calls to `run_command` where a driver offers it, so a driver implements one channel instead of one hook per feature. Follow-up of NetOrk/netork#765 (its plan, phase 9).
Author
Owner

Re-homed by docs/STRUCTURE.md (NAPALM/napalm-device-types#37, NetOrk/netork#1105): part of the napalm-unix step (#35): the readers there use run_command, and the _run_* hooks go away.

Re-homed by `docs/STRUCTURE.md` (NAPALM/napalm-device-types#37, NetOrk/netork#1105): part of the napalm-unix step (#35): the readers there use `run_command`, and the `_run_*` hooks go away.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-device-types#22