feat(time-sync): the host's time sources and zone through PosixTimeSyncMixin #74

Merged
christianmanivong merged 1 commits from feature/time-sync-2361 into main 2026-11-11 14:12:53 +00:00
Owner

Summary

  • LinuxDriver gets get_time_sync() and configure_time_sync() from napalm-device-types 4.35.0's PosixTimeSyncMixin: chrony, systemd-timesyncd, timedatectl; the driver only carries the commands across run_command.
  • PosixScheduledJobsMixin and PosixTimeSyncMixin come in together through LinuxPosixMixin (napalm_linux/_posix.py), so linux.py does not grow past its ratchet baseline. OpenMediaVault and QNAP inherit both.
  • Needs napalm-device-types 4.35.0 (floor bumped). Linux has no NAPALM get_ntp_servers(); nothing to keep consistent there.

Related Issue

NetOrk/netork#2361 (part of NetOrk/netork#2360, time sync)

Testing

  • pytest (406 passed), ruff, mypy, napalm-standard check and ratchet locally, against the napalm-device-types branch feature/time-sync-2361.
  • CI fails until napalm-device-types 4.35.0 is on PyPI; to be rerun after the release.
  • napalm-openmediavault (130 passed) and napalm-qnap-qts (116 passed) against this branch.
## Summary - `LinuxDriver` gets `get_time_sync()` and `configure_time_sync()` from napalm-device-types 4.35.0's `PosixTimeSyncMixin`: chrony, systemd-timesyncd, `timedatectl`; the driver only carries the commands across `run_command`. - `PosixScheduledJobsMixin` and `PosixTimeSyncMixin` come in together through `LinuxPosixMixin` (`napalm_linux/_posix.py`), so `linux.py` does not grow past its ratchet baseline. OpenMediaVault and QNAP inherit both. - Needs napalm-device-types 4.35.0 (floor bumped). Linux has no NAPALM `get_ntp_servers()`; nothing to keep consistent there. ## Related Issue NetOrk/netork#2361 (part of NetOrk/netork#2360, time sync) ## Testing - `pytest` (406 passed), `ruff`, `mypy`, `napalm-standard check` and `ratchet` locally, against the napalm-device-types branch `feature/time-sync-2361`. - CI fails until napalm-device-types 4.35.0 is on PyPI; to be rerun after the release. - napalm-openmediavault (130 passed) and napalm-qnap-qts (116 passed) against this branch.
christianmanivong added 1 commit 2026-11-11 13:33:17 +00:00
feat(time-sync): the host's time sources and zone through PosixTimeSyncMixin
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 1m3s
driver / lowest (pull_request) Successful in 30s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 2m11s
driver / publish (pull_request) Skipped
c2e7ea5789
netOrk aligns every device's NTP servers and time zone with the site's
(NetOrk/netork#2360). A Linux host gets get_time_sync() and
configure_time_sync() from napalm-device-types 4.35.0's
PosixTimeSyncMixin (#2361): one reading as the login user, the zone by
timedatectl, chrony's servers in a file of their own with every other
source commented out, systemd-timesyncd's in a drop-in. The driver only
carries the commands across run_command.

The mixin comes in with PosixScheduledJobsMixin through LinuxPosixMixin,
the implementations napalm-device-types makes for any POSIX host, so
linux.py does not grow. OpenMediaVault and QNAP inherit both.
christianmanivong merged commit 235c1e9a91 into main 2026-11-11 14:12:53 +00:00
christianmanivong deleted branch feature/time-sync-2361 2026-11-11 14:12:53 +00:00
Sign in to join this conversation.