- The five except Exception: pass (OMV version, smartctl per disk,
/proc/mdstat, mdadm --detail, shared folder lookup) now log at debug
level with the module logger (B110), so a swallowed failure leaves a
trace. The returned data is unchanged.
- The get_storage_services docstring example is wrapped to 100 columns.
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff
cannot fix comes in the next commit.
The override counted "N upgraded" in an apt simulation run without a
fixed locale -- nothing matched on a German host -- and hid held-back
packages, which FULL_UPGRADE installs. netOrk names updates_available
from get_available_updates (netOrk #1111).
OpenMediaVault generates sshd_config from its own database; a drop-in
netOrk wrote would be dropped by the next apply of the SSH settings
without a word. harden_ssh_server = None makes netOrk's capability probe
answer no.
Requires napalm-linux 0.5.0; bumps to 0.1.1. NetOrk/netork#1027
The same job as napalm-fritzbox and napalm-opnsense: Python 3.10, 3.11 and
3.12, pytest, then wheel and sdist. napalm-device-types comes from
git.netork.io first, because PyPI has an unrelated package of that name.
pyproject gains a dev extra with pytest, which the job installs.
napalm-linux, which this driver builds on, is installed from git as well:
it is not on PyPI either.
A plain apt-get upgrade holds back OMV's own packages and the kernel;
omv-upgrade is a dist-upgrade. netOrk reads FULL_UPGRADE when it upgrades
the host (MVP 5).
An OMV box is a NAS built on Debian, but this driver inherited LinuxDriver alone
and implemented the storage getters by name, because inheriting StorageDriver as
well would have let its NotImplementedError stubs shadow LinuxDriver's working
package and service methods. DEVICE_CLASS = "storage" then existed to tell
netOrk what the class hierarchy no longer said.
napalm-device-types v1.0 makes role bases declaration-only, so both roles can be
declared honestly and in the order that matters:
class OpenMediaVaultDriver(StorageDriver, LinuxDriver):
device_class comes from that first base now, so DEVICE_CLASS is gone.
get_device_warnings() now returns only {code, meta} — severity, title,
message, and action are resolved centrally by netork's
WARNING_CATALOG (netork/core/device_warnings.py), not by the driver.
Keeps this driver independent of netork and avoids per-vendor drift in
how the same warning code is presented.
The TYPE_LABEL attribute on the base class hierarchy is now the
canonical way for drivers to declare their device category. The
storage_device sentinel flag is removed — classification is determined
by reading TYPE_LABEL via getattr() in the backend.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>