feat: get_service_packages, which packages a systemd service is (NetOrk/netork#1236) #36

Merged
christianmanivong merged 1 commits from feat/service-packages-1236 into master 2026-10-19 17:08:12 +00:00
Owner

Summary

Mixes in napalm-device-types' new ServicePackagesMixin, so get_service_packages() says which installed packages each systemd service is made of (unit file and ExecStart binary). NetOrk/netork#1236 phase 3 uses it to let a decision about one system service reach the host's findings on its packages.

Priority: P3

Changes

  • LinuxDriver gains ServicePackagesMixin; _run_service_packages_command runs the shared read-only command on an exec channel under sh, without sudo (about 1 kB, past what the PTY takes reliably; written for sh whatever the login shell).
  • Requires napalm-device-types >= 4.20.0 (NAPALM/napalm-device-types, branch feat/service-packages-1236); version 0.12.0; CHANGELOG entry.

Related Issue

NetOrk/netork#1236 (phase 3).

Testing

tests/test_linux.py::test_get_service_packages_runs_the_shared_command_under_sh_on_an_exec_channel; whole suite: 210 passed (against the napalm-device-types branch).

Merge after the napalm-device-types PR, which this needs.

## Summary Mixes in napalm-device-types' new `ServicePackagesMixin`, so `get_service_packages()` says which installed packages each systemd service is made of (unit file and `ExecStart` binary). NetOrk/netork#1236 phase 3 uses it to let a decision about one system service reach the host's findings on its packages. Priority: P3 ## Changes - `LinuxDriver` gains `ServicePackagesMixin`; `_run_service_packages_command` runs the shared read-only command on an exec channel under `sh`, without sudo (about 1 kB, past what the PTY takes reliably; written for `sh` whatever the login shell). - Requires napalm-device-types >= 4.20.0 (NAPALM/napalm-device-types, branch `feat/service-packages-1236`); version 0.12.0; CHANGELOG entry. ## Related Issue NetOrk/netork#1236 (phase 3). ## Testing `tests/test_linux.py::test_get_service_packages_runs_the_shared_command_under_sh_on_an_exec_channel`; whole suite: 210 passed (against the napalm-device-types branch). Merge after the napalm-device-types PR, which this needs.
christianmanivong added 1 commit 2026-10-19 16:03:32 +00:00
feat: get_service_packages, which packages a systemd service is (NetOrk/netork#1236)
CI / test (3.10) (pull_request) Successful in 41s
CI / test (3.11) (pull_request) Successful in 40s
CI / test (3.12) (pull_request) Successful in 32s
CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 34s
a2bfa709f9
Mixes in napalm-device-types' ServicePackagesMixin. The transport runs the
shared read-only command on an exec channel under sh, without sudo: it is
about 1 kB, past what the PTY takes reliably, and written for sh whatever
the login shell. Requires napalm-device-types 4.20.0; version 0.12.0.
christianmanivong merged commit facc081123 into master 2026-10-19 17:08:12 +00:00
christianmanivong deleted branch feat/service-packages-1236 2026-10-19 17:08:12 +00:00
Sign in to join this conversation.