driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 14s
driver / test (3.13) (pull_request) Successful in 1m12s
driver / types (pull_request) Successful in 1m20s
driver / test (3.12) (pull_request) Successful in 1m21s
driver / lowest (pull_request) Successful in 33s
driver / build (pull_request) Successful in 38s
driver / security (pull_request) Successful in 1m17s
CI / driver (pull_request) Successful in 3m5s
driver / publish (pull_request) Skipped
napalm-device-types 4.29.0 lets remove_local_account_keys clear the password and sudo too (NetOrk/netork#2033). This driver's _account_clear_password already does the work; a test pins the commands, and the floor rises to 4.29.0.
6.9 KiB
6.9 KiB
Changelog
All notable changes to this driver. The format follows Keep a Changelog, versions follow Semantic Versioning.
[Unreleased]
Added
- Personal accounts on OpenMediaVault follow what the person changes
(NetOrk/netork#2013):
add_local_account(..., replaces=[...])takes the old keys out of OMV's own key store (throughUserMgmt.setUser, applying only what that made dirty) and out of~/.ssh,remove_local_account_keysdoes the same for deleted keys and leaves the account open, andadd_local_account(..., clear_password=True)removes the password (usermod -p '*', as napalm-linux does): the account logs in with its key only and has no sudo. Keys the person added stay. - A deleted key can take the password with it on OpenMediaVault (NetOrk/netork#2033):
through napalm-device-types'
remove_local_account_keys(..., clear_password=True)the keys go through OMV's key store, the password goes (usermod -p '*'), and so does sudo. The account stays open and in_ssh.
Changed
- Needs napalm-device-types 4.29.0 and napalm-linux 0.17.0.
Added
- Scheduled jobs (NetOrk/netork#1933, #18), on top of napalm-linux's reading and writers.
The web UI's "Scheduled Jobs" and the power-management schedule are read through
Cron.getList(keyomv:<uuid>, disabled ones included) instead of the lines OMV generates for them in/etc/cron.d/openmediavault-userdefinedand-powermngmt. They are switched withCron.set(the job unchanged butenable), run withCron.executeand followed throughExec.getOutput(stopped after 300 s), and an application's job is made withCron.setand removed withCron.delete-- an OMV job like any other, its commentnapalm-scheduled-job: <name> <description>. Each write applies thecronmodule alone, so changes pending in the web UI for other modules stay pending; while thecronmodule itself has changes pending, every write is refused, or the apply would put them live too. The cron files OMV generates (/etc/cron.d/openmediavault-*,/etc/cron.hourly/openmediavault-flushmailq,/etc/cron.{daily,weekly}/openmediavault-apticron,/etc/cron.daily/openmediavault-samba-recycle) areplatformand only run: the Linux path refuses to write them, as OMV would undo the edit on its next apply. Every other job keeps napalm-linux's behaviour. Requires napalm-device-types 4.26.0 and napalm-linux 0.16.0. - netOrk's own account with a fixed uid is not made on OMV yet (NetOrk/netork#1817):
_account_create_with_uidraisesNotImplementedError, as the keys go throughUserMgmt, which knows only the users it made. - Personal accounts the way OMV's web UI makes them (NetOrk/netork#1793), on top of
napalm-linux's
get_local_accounts(),add_local_account()andlock_local_account(). OMV's sshd lets in onlyrootand_ssh, and OMV keeps a user's keys in its own database, deploying them to/var/lib/openmediavault/ssh/authorized_keys/<user>. So a new account is made byUserMgmt.setUserin_ssh, an account made outside OMV joins_sshwhen it is opened, and keys are added and removed throughsetUser. Each call applies the modules it made dirty (postfix,ssh) and nothing else: changes left pending in the web UI stay pending.setUsertakes a plain password, which netOrk does not have, so the hash is set withusermod -p. Like the web UI,setUsergives the account OMV's primary groupusers. Checked on a fresh OMV 8 (Debian 13) with the real driver over SSH. Requires the napalm-device-types and napalm-linux releases with personal accounts. set_hostname()the way OMV's web UI renames the NAS:Network.setGeneralSettings(an FQDN sets the domain too, a bare name keeps it), thenConfig.applyChangesfor the modules the rename made dirty plus the hostname modules already dirty. Changes left pending in the web UI are not deployed with it. Replaces the inherited napalm-linux rename (NAPALM/napalm-linux#45), whose/etc/hostnameand/etc/hostsOMV would regenerate on its next apply.
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 SSH hardening is offered again (#20, NetOrk/netork#1950): it goes into the drop-in under
/etc/ssh/sshd_config.d, which OpenMediaVault's generatedsshd_configincludes and salt leaves alone, never intosshd_configitself (SSHD_CONFIG_GENERATED, napalm-device-types 4.26.0). Requires napalm-device-types 4.26.0.
Fixed
get_disks()reports each disk's SMART verdict:healthywhen smartctl's overall self-assessment passed (SCSI/SAS: health statusOK),failedwhen it failed or a SCSI disk predicts a failure,unknownonly when the disk gives none. The driver asked smartctl without-H, which never prints the verdict: a disk readunknown, and an ATA disk with an attribute table readfailedfrom that table'sWHEN_FAILEDcolumn, whatever its state.get_disks()puts a disk in the md array only when the disk itself or one of its partitions is a member:sdano longer joins the array ofsdaa1, nornvme0n1that ofnvme0n11./proc/mdstatis read once per call instead of once per disk.get_disks()reports a SCSI/SAS disk's temperature (Current Drive Temperature); it read-1for every SAS disk. A disk that prints0 Cthere, as QEMU's virtual disks do, still reads-1.get_disks()raisesCommandErrorExceptionwhenlsblkfails or prints no device list, and lets a failed/proc/mdstatread raise; it returned[], the answer for a NAS without disks, so every disk vanished on a transient error (#16).get_disks()reportswarningfor a disk whose verdict passed but that counts lost or unreadable sectors: ATA reallocated, pending or offline-uncorrectable sectors, SAS grown defects, an NVMe critical-warning flag or NVMe media errors (#16).- A failed
smartctlcall (timeout, sudo refused, device not opened) is logged at warning level with the reason; it was logged at debug level and looked like a disk without SMART. The disk still readsunknown(#16).
[0.3.0] - 2026-10-23
The first release on PyPI.
Changed
- The driver follows the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, 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. The package now ships
py.typed, a README and a LICENSE file. It needs napalm-device-types 4.22.0 and napalm-linux 0.15.0. Python 3.9 is no longer supported; napalm-device-types never ran on it. - Failures the driver deliberately ignores (the OpenMediaVault version,
smartctlfor one disk,/proc/mdstat,mdadm --detail, a shared folder lookup) are now logged at debug level.