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
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.
16 lines
619 B
Python
16 lines
619 B
Python
"""What napalm-device-types implements for any POSIX host over ``run_command``.
|
|
|
|
The driver supplies ``run_command``; the readings, their parses and the writes are
|
|
the mixins': scheduled jobs (cron, anacron, systemd timers) and time sync (chrony,
|
|
systemd-timesyncd, ``timedatectl``). Their default paths are Debian's, which a
|
|
Linux host shares.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from napalm_device_types import PosixScheduledJobsMixin, PosixTimeSyncMixin
|
|
|
|
|
|
class LinuxPosixMixin(PosixScheduledJobsMixin, PosixTimeSyncMixin):
|
|
"""Scheduled jobs and time sync of the host, over the driver's ``run_command``."""
|