driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m3s
driver / test (3.13) (pull_request) Successful in 1m12s
driver / test (3.12) (pull_request) Successful in 1m18s
driver / lowest (pull_request) Successful in 47s
driver / build (pull_request) Successful in 34s
driver / security (pull_request) Successful in 3m34s
CI / driver (pull_request) Successful in 5m2s
driver / publish (pull_request) Skipped
Some devices keep a copy of their configuration for every save and can go back to one. An application restores a configuration there by reverting to the revision that holds it; on OPNsense that is the only way, since its API takes no uploaded config.xml (NetOrk/netork#2511). ConfigRevisionsMixin declares get_config_revisions() (newest first, as ConfigRevisionDict) and get_config_revision(revision_id). revert_config_revision(revision_id) is a template over the driver's _revert_to_config_revision step: it refuses an id that is not in the history (UnknownConfigRevision), reads the revision before the revert can rotate it out, and afterwards checks that the newest revision holds its configuration (ConfigRevertFailed otherwise), since a device may report a revert it did not make. config_revision_content(text) is the hook where a driver leaves out what its device stamps into every save, so revisions with the same configuration compare equal. Refs NetOrk/netork#2511
478 lines
30 KiB
Markdown
478 lines
30 KiB
Markdown
# Changelog
|
||
|
||
All notable changes to napalm-device-types. The format follows
|
||
[Keep a Changelog](https://keepachangelog.com/), versions follow
|
||
[Semantic Versioning](https://semver.org/). Versions up to 4.21.0 were not
|
||
recorded here; their history is the git log.
|
||
|
||
## [Unreleased]
|
||
|
||
### Added
|
||
- `ConfigRevisionsMixin`: a device's own configuration history (NetOrk/netork#2511).
|
||
`get_config_revisions()` (newest first, the first in place now, as
|
||
`ConfigRevisionDict`: id, UTC time, description, user, size) and
|
||
`get_config_revision(revision_id)` are declared. `revert_config_revision(revision_id)`
|
||
is a template over the driver's `_revert_to_config_revision`: it refuses an id that is
|
||
not in the history (`UnknownConfigRevision`), and after the revert checks that the
|
||
newest revision holds the revision's configuration, else `ConfigRevertFailed`; it
|
||
returns that revision. `config_revision_content(text)` leaves out what a device stamps
|
||
into every save, so an application can compare revisions with a configuration it has.
|
||
- `add_service_account(..., replaces=[...])`: netOrk's keys the new one takes the place of
|
||
go from its account once the new key is in it (step `old keys`), never the new key
|
||
itself; while the new key could not be added they stay, so netOrk keeps its way in.
|
||
netOrk calls it through a login with the new key, after trying that login, to move a
|
||
host from its installation-wide key to its site's (NetOrk/netork#2462).
|
||
- Each forwarding rule of `LogForwardingDict` names its `template`: the one the rule
|
||
gives (`@host;RSYSLOG_SyslogProtocol23Format`, `action(… template="…")`), else the
|
||
default set before it (`$ActionForwardDefaultTemplate`, or
|
||
`module(load="builtin:omfwd" template="…")` for omfwd actions), else None -- rsyslog's
|
||
own default, RFC 3164, which sends the host's local time without a time zone. A
|
||
reader can tell a rule whose timestamps a collector files shifted (NetOrk/netork#493).
|
||
|
||
### Fixed
|
||
- `apply_dhcp_reservationset` writes its changes so an address is released before it is
|
||
taken: an update that moves a reservation off its address goes before the change that
|
||
takes that address (along a chain, from its free end), and adds come after every
|
||
update. A server that keeps addresses unique at each write, such as Kea, no longer
|
||
refuses the second reservation as a duplicate when an address moves from one to
|
||
another. A swap -- reservations trading addresses, or a longer rotation -- has no such
|
||
order: its changes are still tried, and where the server refuses them the `[failed]`
|
||
line says it was a swap and with which reservations. Everything else is still written
|
||
and committed, and `DhcpApplyError` follows (#106).
|
||
- `apply_dhcp_subnetset` no longer stops at the first subnet the device refuses. As
|
||
`apply_dhcp_reservationset` has since 4.35.1, a refused subnet gets a `[failed]` line,
|
||
the others are still written, any non-empty diff is committed -- even one whose every
|
||
write was refused -- and `DhcpApplyError` follows. Before, the subnets written ahead of
|
||
the refused one stayed saved but inactive, and since the device reports them as
|
||
configured, no later apply committed them. `DhcpApplyError` takes an optional `kind`
|
||
(`"reservation"` by default, `"subnet"` here) that its message names (#113).
|
||
|
||
## [4.37.0] - 2026-11-12
|
||
|
||
### Added
|
||
- `UpdateMixin.get_installed_advisory_cves()` (declared): the CVEs a host's installed
|
||
security advisories close, per package. With `DNF_INSTALLED_CVES_COMMAND` (dnf 4,
|
||
read from the cache) and `parse_dnf_installed_cves()`, the parser every dnf driver
|
||
shares. netOrk reads it where its knowledge base holds no records of the host's
|
||
release, as the distribution's word that a backport is in (netOrk #2394).
|
||
|
||
## [4.36.2] - 2026-11-12
|
||
|
||
### Fixed
|
||
- `kernel_reboot_pending` compares kernel releases the way rpm does (`rpmvercmp`). A
|
||
number is newer than letters in the same place, so an Oracle Linux host running
|
||
`6.12.0-208.112.5.1.el9uek` no longer asks to reboot into the older
|
||
`6.12.0-208.112.5.el9uek`. A `~` (release candidate) comes before its release (#109).
|
||
|
||
## [4.36.1] - 2026-11-12
|
||
|
||
### Fixed
|
||
- The host status no longer reports an Oracle Linux host's UEK kernels as an interrupted
|
||
dnf transaction. The installonly packages are now also the ones the host's libdnf was
|
||
built with, read from its Python binding: Oracle adds `kernel-uek` and its parts there,
|
||
and their packages provide nothing of upstream's defaults (#107).
|
||
|
||
## [4.36.0] - 2026-11-11
|
||
|
||
### Added
|
||
- `TimeSyncDict.dhcp_ntp_servers` (not required): the NTP servers a device got by DHCP
|
||
(option 42) and uses, in its order; `[]` for none, absent or None where the driver cannot
|
||
tell. `ntp_servers` stays the servers configured on the device and no longer holds
|
||
DHCP's. A device that gets the site's time giver by DHCP is aligned, so an application
|
||
has to tell the two apart (NetOrk/netork#2380).
|
||
- `PosixTimeSyncMixin` reads them: chrony's sources from the DHCP client's `sourcedir`
|
||
(`CHRONY_DHCP_DIRS`, `/run/chrony-dhcp` by default), systemd-timesyncd's
|
||
`LinkNTPServers`. Where ntpd or OpenNTPD runs they are unknown (None).
|
||
`timesyncd_link_servers` is public.
|
||
|
||
### Changed
|
||
- `configure_time_sync` leaves DHCP-provided NTP servers alone. chrony: only `server`,
|
||
`pool` and `peer` lines are commented out; no `sourcedir` line is any more, and the DHCP
|
||
client's files are left alone. systemd-timesyncd: a link's servers stay and no longer
|
||
fail the `verify` step.
|
||
- A write gives back a DHCP client's `sourcedir` that 4.35.0 commented out
|
||
(`#napalm-time-sync: sourcedir /run/chrony-dhcp`), so a host aligned by 4.35.0 hears DHCP
|
||
again; chronyd restarts for it. Another `sourcedir` 4.35.0 took out stays out.
|
||
- `timesyncd_servers` returns the configured servers (runtime, then system) without a
|
||
link's; the fallback only while there is no server at all.
|
||
|
||
## [4.35.1] - 2026-11-11
|
||
|
||
### Fixed
|
||
- `apply_dhcp_reservationset()` no longer stops at the first reservation the device refuses.
|
||
One refused write (on OPNsense, an address in a subnet Kea does not manage) ended the run
|
||
before the commit: every later reservation went unwritten, and the earlier ones stayed
|
||
saved but inactive, where the next diff found them configured and never committed them. A
|
||
refused change now gets a `[failed] <mac> -> <ip>: <reason>` line, the others are written,
|
||
any non-empty diff commits, and `DhcpApplyError` (a `RuntimeError`, exported) is raised
|
||
after the commit with how many of how many were refused (NetOrk/netork#2381).
|
||
|
||
## [4.35.0] - 2026-11-11
|
||
|
||
### Added
|
||
- `TimeSyncMixin`: a device's time sources and time zone. `get_time_sync()` (declared only)
|
||
returns `TimeSyncDict` -- the configured NTP servers in the device's order, the zone as an
|
||
IANA name (None where the device keeps no name), whether the clock is synchronised now,
|
||
and the client (`chrony`, `systemd-timesyncd`, `ntpd`, `openntpd`; None for the device's
|
||
own). `configure_time_sync(ntp_servers=None, timezone=None)` is a fix template: None
|
||
leaves a value alone, the device ends up with exactly the servers given, in order, and a
|
||
`verify` step reads it back. An unknown zone, a malformed server, an empty list or a value
|
||
outside the driver's `time_sync_writes` is refused before anything is written.
|
||
`TIME_SYNC_VALUES` and `check_ntp_servers` are public (NetOrk/netork#2361).
|
||
- `PosixTimeSyncMixin` implements it over `run_command`: read in one round trip as the login
|
||
user (`timedatectl`, chrony's configuration and `chronyc -n sources`, `timedatectl
|
||
show-timesync`, ntpd's and OpenNTPD's configuration); the zone by `timedatectl
|
||
set-timezone`; chrony's servers in a file of their own (`sources.d`, else a `confdir` or
|
||
an included file) with every other source commented out, then `chronyc reload sources` or
|
||
a restart; systemd-timesyncd's in a drop-in that resets `NTP=` and empties `FallbackNTP=`.
|
||
ntpd and OpenNTPD are read, not written. `parse_time_sync` is public.
|
||
- `napalm_device_types.posix_tz` (from netOrk): `posix_tz`, `is_iana_zone`, `is_posix_tz` and
|
||
`UnknownTimezone`, and `parse_posix_tz`, which takes a POSIX rule apart into the UTC
|
||
offset and the summer-time transitions a switch wants (`PosixTzDict`,
|
||
`DstTransitionDict`).
|
||
|
||
### Changed
|
||
- Needs `tzdata` (2024.1 or later): the zones' rules come from its TZif files.
|
||
|
||
## [4.34.0] - 2026-11-10
|
||
|
||
### Added
|
||
- `RunningBackupsMixin.get_running_backups()`: the backups running on a device right now --
|
||
a hypervisor's backup of its guests (with the guests it is taking now), a backup server's
|
||
backup, sync, verify, garbage collection, prune or tape run, a host's own file-level backup.
|
||
Declared only; a driver mixes it in when it can tell, and a driver without it cannot tell.
|
||
`RunningBackupDict`, `RunningBackupKind` and `RUNNING_BACKUP_KINDS` are public. An
|
||
application asks right before it restarts a device (NetOrk/netork#2318).
|
||
|
||
## [4.33.0] - 2026-11-07
|
||
|
||
### Added
|
||
- `get_host_status()` tells an interrupted package manager on hosts without dpkg too, and
|
||
says which one it read in the new `package_manager` field (`dpkg`, `dnf`, `yum`, `apk`,
|
||
`opkg`, or None). dnf and yum: a package installed in two versions (not the kernels and
|
||
other packages dnf keeps side by side) as state `duplicate`, or a transaction that never
|
||
ended (dnf 4's history, yum's `transaction-all` journal). apk: a package apk marked with
|
||
broken files or a broken script (`broken-files`, `broken-script`), the ones `apk fix` would
|
||
take. opkg: a package left `unpacked`, `half-configured` or `half-installed`, or flagged for
|
||
reinstallation. All read without root; while one of them runs the answer is unknown
|
||
(NetOrk/netork#851).
|
||
|
||
## [4.32.0] - 2026-11-07
|
||
|
||
### Added
|
||
- `SshServerAuthMixin.get_ssh_server_auth()`: how an OpenSSH server lets people log in --
|
||
password, keyboard-interactive, public key, host-based and GSSAPI authentication,
|
||
`AuthenticationMethods` as lists of methods, `PermitRootLogin` and `UsePAM`, from `sshd -T`
|
||
as root, and sshd's PAM `auth` stack (each module with its control and arguments, includes
|
||
followed), from `/etc/pam.d` as the login user. `OpenSshServerMixin` carries it, so every
|
||
driver that can harden sshd has it. `parse_sshd_auth`, `parse_pam_auth`, `parse_pam_files`,
|
||
`pam_auth_stack` and `SSHD_EFFECTIVE_COMMAND` are public (NetOrk/netork#662).
|
||
|
||
## [4.31.1] - 2026-11-06
|
||
|
||
### Fixed
|
||
- `get_log_sources()` names as a file's writer only a process that holds it open for writing.
|
||
A log reader -- CrowdSec, Promtail, rsyslog's `imfile`, a `tail -F` -- was given the file
|
||
it reads as if it wrote it. A file only readers hold is now listed without a producer
|
||
(`unit` and `process` None); one only a reader inside a container holds is left out, as its
|
||
path is that container's view of a mount. The access mode comes from
|
||
`/proc/<pid>/fdinfo/<fd>`, read in the same command (NetOrk/netork#2092).
|
||
|
||
## [4.31.0] - 2026-11-06
|
||
|
||
### Added
|
||
- `get_log_sources()` also says where the logs go beyond the host: `forwarding` holds whether
|
||
rsyslog runs, its forwarding rules (legacy `@`/`@@`/`:omrelp:` and RainerScript
|
||
`omfwd`/`omrelp`, with selector, ruleset and whether they take every message), its `imfile`
|
||
inputs, and whether the journal reaches it (`imjournal`, or `imuxsock` with journald's
|
||
`ForwardToSyslog`). Read in the same command; `parse_log_forwarding` and `parse_rsyslog` are
|
||
public (NetOrk/netork#2053).
|
||
|
||
## [4.30.0] - 2026-11-04
|
||
|
||
### Added
|
||
- `LogSourcesMixin.get_log_sources()`: every log a Linux host writes. Sources are the units
|
||
journald holds entries for, the log files running processes hold open (with size, last write
|
||
and the service or container writing them), and the engine's file of each container's output.
|
||
A file a container writes is named by the container's own path. `LOG_SOURCES_COMMAND` and
|
||
`parse_log_sources` are public, and a host whose `find` cannot list open files (busybox)
|
||
raises `LogSourcesUnavailable`. A driver supplies `_run_log_sources_command(command,
|
||
privileged=)`, as for listening sockets (NetOrk/netork#2049).
|
||
|
||
## [4.29.0] - 2026-11-04
|
||
|
||
### Added
|
||
- `remove_local_account_keys(name, keys, *, clear_password=False)`: with `clear_password`
|
||
the account's password goes along with the keys, and so do its sudo rule and admin
|
||
groups, as sudo asks for that password. For a person who deleted their key and whose
|
||
password went with it. The account stays open; the steps are `keys`, `password` and
|
||
`sudo`, each run when another failed (NetOrk/netork#2033).
|
||
|
||
## [4.28.0] - 2026-11-04
|
||
|
||
### Added
|
||
- `LocalAccountsMixin.add_local_account(..., replaces=[...])`: the keys the new one takes
|
||
the place of go from the account, matched by their base64 whatever a line's options or
|
||
comment. Keys the person added on the host stay. The step is `old keys`; it runs even
|
||
when the new key could not be added (NetOrk/netork#2013).
|
||
- `add_local_account(..., clear_password=True)`: the account's password goes, and it logs
|
||
in with a key only. Step `password`. It cannot be combined with a `password_hash` or
|
||
with `admin=True`, as the sudo rule asks for that password. A driver supplies
|
||
`_account_clear_password`; one that does not fails the step and says so.
|
||
- `LocalAccountsMixin.remove_local_account_keys(name, keys)`: takes the named keys off an
|
||
account and leaves it open, its password and sudo as they are -- for a person who
|
||
deleted a key and has no new one. Step `keys`.
|
||
- A driver whose host keeps keys elsewhere overrides `_account_drop_keys` next to
|
||
`_account_add_key` and `_account_remove_keys`.
|
||
|
||
## [4.27.0] - 2026-11-03
|
||
|
||
### Added
|
||
- `ScheduledJobsMixin`: what a host runs on its own schedule as one shape,
|
||
`ScheduledJobDict` — cron lines, run-parts scripts, anacron, systemd timers, `periodic`,
|
||
a platform's own jobs, Windows tasks — with who owns each definition (`managed_by`) and
|
||
what the driver can do to it (`actions`). `get_scheduled_jobs` reads them with the host's
|
||
time zone; `manage_scheduled_job` enables, disables or runs one now; `put_scheduled_job`
|
||
and `delete_scheduled_job` create, change and delete a job an application writes. Every
|
||
write names the `digest` the caller saw (`job_digest`) and raises `ScheduledJobChanged`
|
||
when the host's definition differs; `ScheduledJobRefused` for a job that cannot take a
|
||
verb (NetOrk/netork#1933, #86).
|
||
- `PosixScheduledJobsMixin`: the implementation over the command channel. One framed report
|
||
as root reads `/etc/crontab`, `/etc/cron.d`, the user crontabs, the run-parts directories,
|
||
`/etc/anacrontab` and every systemd timer with the unit it starts, and which package owns
|
||
each definition. A cron line is switched off behind `#napalm-disabled: `; an
|
||
application's job is a timer where systemd runs, else a file in `/etc/cron.d` or marked
|
||
lines in the user's crontab.
|
||
- `napalm_device_types.cron`: cron expressions as Vixie cron reads them, their next runs in
|
||
a time zone, and as systemd `OnCalendar` lines that fire on exactly the same minutes.
|
||
|
||
### Removed
|
||
- `OSDriver.get_cron_jobs` and `CronJobDict`. No application called them; the readers in
|
||
napalm-linux and napalm-bsd go with them. `get_scheduled_jobs` replaces them.
|
||
|
||
## [4.26.0] - 2026-11-03
|
||
|
||
### Added
|
||
- `OpenSshServerMixin.SSHD_CONFIG_GENERATED`: a driver whose platform writes sshd_config
|
||
from its own database, but includes `/etc/ssh/sshd_config.d` (OpenMediaVault), sets it
|
||
and keeps `harden_ssh_server`. The hardening then goes only into the drop-in; a
|
||
sshd_config without that include is left alone and the result says why, since the
|
||
platform would write over a change to it on its next apply (#88, NetOrk/netork#1950).
|
||
|
||
## [4.25.0] - 2026-11-02
|
||
|
||
### Added
|
||
- `BackupServerDriver` (`ROLE = "backup_server"`), a role base for backup servers such as
|
||
Proxmox Backup Server (#82). It declares `get_backup_datastores`, `get_backup_groups`
|
||
(each group with its newest snapshot), `get_backup_snapshots`, `get_backup_jobs`
|
||
(garbage collection, verify, prune, sync and tape in one list) and `get_backup_remotes`,
|
||
and the actions `start_garbage_collection`, `run_backup_job`, `verify_backup_snapshot`,
|
||
`set_backup_snapshot_protected` and `delete_backup_snapshot`, which return a task to
|
||
follow with `get_backup_task`. The shapes live in `napalm_device_types.backups`. A
|
||
server that manages its own disks lists `StorageDriver` as its second role.
|
||
- `ClusterStorageDict.backup_server` (optional): which backup server, datastore and
|
||
namespace a hypervisor's backup storage writes to, with the certificate fingerprint it
|
||
pins, so an application can tie a server's backup groups to a cluster's guests.
|
||
|
||
## [4.24.0] - 2026-11-02
|
||
|
||
### Added
|
||
- `parse_lldpctl_keyvalue(output)` and `LLDPCTL_KEYVALUE_COMMAND`: lldpd's neighbours
|
||
(`lldpctl -f keyvalue`) as one `LldpNeighborRow` per neighbour, for every driver of a
|
||
host that runs lldpd. Several neighbours on one port (a phone and the PC behind it, an
|
||
unmanaged switch) stay apart, an interface name with dots (`eth0.1`) stays whole, the
|
||
chassis and port ids are read whatever their type (MAC, address, interface name, local
|
||
id), with management addresses and capabilities. A failed lldpctl (lldpd not running,
|
||
lldpctl missing) raises instead of reading as no neighbours.
|
||
- `lldp_neighbors(rows)` and `lldp_neighbors_detail(rows, interface="")`: NAPALM's
|
||
`get_lldp_neighbors` and `get_lldp_neighbors_detail` from those rows, so a driver no
|
||
longer builds the two shapes itself. A neighbour that names its chassis by a MAC
|
||
address carries it in `get_lldp_neighbors` as `mac`, in lower case
|
||
(`LldpNeighborDict`), so an application can match it by MAC.
|
||
|
||
### Fixed
|
||
- `DNF_SECURITY_COMMAND` reads the cached metadata only (`dnf --cacheonly`), as
|
||
`APT_UPGRADABLE_COMMAND` reads apt's local index (#76). With an expired cache dnf
|
||
downloaded the repositories' metadata first, and on an Oracle Linux host on OCI that
|
||
outlasted netOrk's whole poll budget. Refreshing the index stays a step of its own
|
||
(`dnf makecache`). Without a cache dnf fails at once, which already reads as
|
||
"security unknown".
|
||
|
||
## [4.23.0] - 2026-11-02
|
||
|
||
### Changed
|
||
- Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver
|
||
on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).
|
||
- The floor on napalm is 5.1: older releases import `pkg_resources`, which a Python
|
||
3.12 venv no longer has.
|
||
- `requests` is a declared dependency (floor 2.25.0), for `tls_certificates`; it came
|
||
with napalm before.
|
||
- The SNMP health profile shapes (`SnmpHealthProfile`, `SnmpValueSpec`,
|
||
`SnmpMemorySpec`, `SnmpInterfacesSpec`) are defined in
|
||
`napalm_device_types.snmp_health_profile`. The package and `models` still export
|
||
them, so an existing import keeps working.
|
||
|
||
### Added
|
||
- `HypervisorDriver.get_vm_migration_preflight(name)`, `migrate_vm(name, target_node,
|
||
online=True, target_storage=None, timeout=3600)` and `set_node_maintenance(node,
|
||
enabled)`: which nodes of its cluster a guest could move to and what blocks it
|
||
(`MigrationPreflightDict`: `allowed_nodes`, `refused_nodes` with the platform's
|
||
reason, `local_disks` the migration copies, `local_resources` that block it), the
|
||
move itself, blocking until the platform's task ended and raising with the
|
||
platform's own cause, and a node's HA maintenance mode. Declared only; netOrk
|
||
probes each with `hasattr`.
|
||
- `get_clusters()` may report HA, backups and quorum votes: `ClusterDict.ha_resources`
|
||
(`HAResourceDict`: requested and current state, node, PVE 8 group, PVE 9 rules),
|
||
`backup_jobs` (`BackupJobDict`: schedule, storage, mode, the guests a job covers)
|
||
and `backups` (`BackupDict`: per guest and storage the newest backup, its size
|
||
and how many there are), and `ClusterNodeDict.votes`. All `NotRequired`, so
|
||
drivers written before stay valid; None means could not be read, `[]` read and
|
||
empty.
|
||
- `napalm_device_types.tls_certificates`: TLS certificates by trust on first use, the
|
||
counterpart of `ssh_host_keys` for a driver's HTTPS API. A driver takes the
|
||
fingerprint to expect from `optional_args["tls_fingerprints"]` (by port, the SHA-256
|
||
of the DER certificate, `SHA256:AB:CD:…`) and refuses any other certificate with
|
||
`TlsCertificateMismatch` (a `ConnectionException` naming both fingerprints) before a
|
||
password is sent; no CA is consulted, so a self-signed certificate verifies. Without
|
||
a fingerprint the first certificate is accepted. Every certificate seen goes to
|
||
`optional_args["tls_certificate_observer"]`. `CertificateCheck.verify_server()`
|
||
checks the certificate in a handshake of its own, `pin(session)` makes every later
|
||
connection of a `requests` session present the same one, `refusing()` turns a refusal
|
||
there into the mismatch, `observe()` reports it once the login stands
|
||
(NAPALM/napalm-hpe-aruba-procurve#17).
|
||
- `LldpAgentMixin.configure_lldp_agent(interfaces)` (`napalm_device_types.fixes`): run
|
||
an LLDP agent on the interfaces the caller names. The template installs the agent
|
||
(`ensure_package(LLDP_AGENT_PACKAGE)`), has the driver write the interface list
|
||
(`_write_lldp_agent_config`), then enables and restarts the service
|
||
(`manage_service(LLDP_AGENT_SERVICE, …)`); both names default to `lldpd`. No
|
||
interface is a ValueError before anything changes. It is the action for what LLDP
|
||
getters used to do on their own (NAPALM/napalm-openwrt#8).
|
||
- `SnmpValueSpec.unknown`: a driver whose device's agent answers a value wrongly says
|
||
so in its `SNMP_HEALTH_PROFILE` (`"cpu": {"unknown": True}`), and the application
|
||
reports no value for it -- not the standard reading, not 0. OpenBSD's net-snmp,
|
||
which reports the CPU as never idle, is the case (NAPALM/napalm-bsd#7).
|
||
- `VMProvisionIncomplete` (`napalm_device_types.provisioning`): what
|
||
`create_vm_from_cloud_init` raises when it fails after the VM was created. A
|
||
`RuntimeError` with the failure as its cause and the half-built VM's `vmid` and
|
||
`node`, so the caller can remove it with `destroy_vm` (NAPALM/napalm-proxmox#28).
|
||
- `HypervisorDriver.get_clusters()` and its shapes `ClusterDict`, `ClusterNodeDict`,
|
||
`ClusterStorageDict`, `ClusterNetworkDict`: every cluster the connection can see,
|
||
with its nodes (offline ones included, `local` on the node the connection is),
|
||
their CPU and memory, and the storages and networks with the nodes that see each.
|
||
A standalone host is a cluster of one with no name; a manager reports each cluster
|
||
and standalone host it runs. Declared only (NetOrk/netork#484, #1821).
|
||
- `create_vm_from_cloud_init(node=…)`: the cluster node to create the VM on. None
|
||
leaves it to the driver; a driver that can only create on its own node raises
|
||
ValueError for another (NetOrk/netork#1822).
|
||
- `LocalAccountsMixin.add_service_account(name, public_key)`: netOrk's own account,
|
||
created through the account the driver logs in with today. It takes a key and no
|
||
password, and a rule of its own in `85-service-<name>` lets it run everything as
|
||
root without a password (`NOPASSWD: ALL`, checked with `visudo` and `sudo -l`). An
|
||
account that is there is opened again and keeps its other keys; root is refused
|
||
(NetOrk/netork#1817). With `uid=`, a new account gets that uid once no other account
|
||
has it; one that is there keeps its own. A driver supplies
|
||
`_account_create_with_uid`. An account that is there and cannot log in (`nologin`,
|
||
`false`) is another service's, such as a netOrk satellite's `netork`, and is refused
|
||
before anything changes.
|
||
- `LocalAccountsMixin` (`napalm_device_types.local_accounts`): personal login accounts
|
||
on a host. `get_local_accounts(names)` reads them back (groups, lock, sudo, key
|
||
files), `add_local_account(name, public_key, password_hash=, admin=)` creates or
|
||
reopens one, `lock_local_account(name)` takes its keys and sudo away and refuses
|
||
every login while keeping its home. Every command root runs is one fixed command,
|
||
the key files are read and written as the account itself, and the sudo rule is a
|
||
drop-in of its own, checked with `visudo` and `sudo -l`. A driver supplies the
|
||
commands that create, open and lock an account and take it out of a group, and may
|
||
replace where the keys are kept (`_account_key_files`, `_account_read_keys`,
|
||
`_account_add_key`, `_account_remove_keys`; default `~/.ssh/authorized_keys`)
|
||
(NetOrk/netork#1793).
|
||
- `OpenSshServerMixin.exempt_from_ssh_penalties`: puts the address the host sees
|
||
the managing client at (`$SSH_CONNECTION`) into `PerSourcePenaltyExemptList`,
|
||
in `/etc/ssh/sshd_config.d/00-netork-penalty-exempt.conf`, next to the host's
|
||
own exemptions. Only where sshd has per-source penalties (OpenSSH 9.8+; an older
|
||
one refuses the directive) and sshd_config includes the drop-in directory;
|
||
checked with `sshd -t` and `sshd -T`, then a new session, and taken back on any
|
||
failure. Helpers: `parse_penalty_exemptions`, `client_address`, `is_exempt`
|
||
(NetOrk/netork#1800).
|
||
- `retry_refused` and `refused_before_banner` (`napalm_device_types.ssh_host_keys`):
|
||
a connection sshd closes before its banner -- what OpenSSH 9.8+ does to a source
|
||
it has just penalised -- is tried again after 1, 3, 7 and 15 s.
|
||
`HostKeyCheck.connect` does so itself (NetOrk/netork#1800).
|
||
- `ARP_AGE_UNKNOWN` (`napalm_device_types.arp`, `-1.0`): the `age` a driver reports
|
||
in `get_arp_table` and `get_ipv6_neighbors_table` when the device does not say how
|
||
old an entry is. `0.0` means "confirmed just now" and is no stand-in for it
|
||
(NetOrk/netork#1327).
|
||
- `NetworkTargetDict.uplinks` (optional): the physical NICs a bridge leaves the
|
||
host through, one group per way out -- a bond's slaves together, a single NIC
|
||
alone (`[["eno1", "eno2"]]`). A missing key means unknown, an empty list a
|
||
bridge without uplink. NetOrk follows their LLDP neighbours to the switch port
|
||
and its untagged VLAN; one slave's neighbour speaks for its bond
|
||
(NetOrk/netork#1325).
|
||
- `HostShutdownMixin.shutdown_host()`, on `DeviceTypeDriver`: shut the device itself
|
||
down cleanly through its own means; declared, so `hasattr` says whether a driver
|
||
can. No forced variant (NetOrk/netork#1636).
|
||
- `VmStopRequestMixin.begin_stop_vm(name)`: ask for a VM's clean shutdown and return
|
||
at once, for callers that wait on a timer instead of in `stop_vm`. No role demands
|
||
it (NetOrk/netork#1636).
|
||
- `SudoHistoryMixin` (`napalm_device_types.sudo_history`): the sudo password an earlier
|
||
driver typed into an interactive shell (`echo '<password>' | sudo -S -p "" …`) and
|
||
left in the login user's shell history, for a driver to mix in (NetOrk/netork#1090).
|
||
The driver says what its lines carry (`SUDO_HISTORY_MARKER`) and which files its
|
||
partial sudo left to the login user (`SUDO_ROOT_FILES`), and supplies `run_command`.
|
||
- `get_history_sudo_lines()` counts the lines per history file (`~/.bash_history`,
|
||
`~/.zsh_history`, `~/.ash_history`, `~/.sh_history`) with `grep -c` as the login
|
||
user. No line is read back; a file it cannot read raises.
|
||
- `remove_history_sudo_lines()` deletes exactly those lines as the login user (`sed
|
||
-i`, its backup overwritten with `shred -u`), and as root gives each of
|
||
`SUDO_ROOT_FILES` back to `root:root` where it is a regular file, not a symbolic
|
||
link, owned by the login user. It reports every file's lines before and after,
|
||
how many were removed and which files are root's again. Nothing goes to stdin.
|
||
|
||
### Fixed
|
||
- `AptProxyMixin` knows that apt's https sources take the http proxy too: apt's https
|
||
method asks `Acquire::https::Proxy` and then `Acquire::http::Proxy`, for the host and
|
||
then for all. An `00proxy` with the http line alone sent download.docker.com and
|
||
every other https source to apt-cacher-ng, which answers `403 CONNECT denied` without
|
||
a `PassThroughPattern`, and the whole upgrade failed (NetOrk/netork#1811).
|
||
- The report carries `https_proxy`, `https_per_host` and `https_settings`;
|
||
`https_proxy_for(report, host)` is the proxy apt takes for one https host.
|
||
- `check_https_source()` fetches one https source's `InRelease` the way apt does;
|
||
None where no https source goes through a proxy.
|
||
- `configure_package_proxy` gains an `https` step: one https source through the new
|
||
proxy. Where the proxy refuses it, `00proxy` also says `Acquire::https::Proxy
|
||
"DIRECT";`, later https lines to the same proxy are commented out, and the source
|
||
is fetched direct. An HTTP error from the mirror counts as let through.
|
||
- `apt_fetch_command` takes https URLs; `direct` sets the host's https setting too.
|
||
- `comment_out_command(..., scheme="https")`.
|
||
|
||
## [4.22.0] - 2026-10-23
|
||
|
||
### Added
|
||
- `AptProxyMixin` (`napalm_device_types.apt_proxy`): apt's proxy on a
|
||
Debian-family host, for a driver to mix in (NetOrk/netork#1397).
|
||
- `get_package_proxy()` is the proxy apt really fetches through, as
|
||
`apt-config dump` says, and no longer the content of one file. A proxy the
|
||
Debian or Ubuntu installer set elsewhere wins over `00proxy`, and was missed.
|
||
- `get_package_proxy_report()` adds where it is set: every line of apt's
|
||
configuration that sets it, in the order apt reads them, the per-host
|
||
proxies, and the sources fetched over http and over https.
|
||
- `check_package_proxy(url, expect)` fetches a page from the host with apt's
|
||
own downloader, past any proxy, and says whether the host reached it and
|
||
whether the page says what you expected.
|
||
- `configure_package_proxy(url)` writes the proxy, comments out every other
|
||
line that sets a different one, reads the result back and fetches one
|
||
source through the proxy. It fails when apt still fetches elsewhere.
|
||
- `same_proxy_url()` compares two proxy URLs by scheme, host and port.
|
||
|
||
## [4.21.1] - 2026-10-22
|
||
|
||
The first release on PyPI since 0.1.0.
|
||
|
||
### Changed
|
||
- The package follows the NAPALM driver standard
|
||
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, strict
|
||
mypy, the tests on Python 3.10–3.13 and at the lowest declared versions,
|
||
bandit, pip-audit and a build check, and a release tag publishes to PyPI.
|
||
- Type annotations use builtin generics (`list[str]`, `X | None`) instead of
|
||
`typing.List` and `Optional`. They mean the same to a type checker.
|
||
- The project links point at git.netork.io instead of GitHub.
|