20 Commits
Author SHA1 Message Date
christianmanivong 481f047fff Merge pull request 'chore: adopt the NAPALM driver standard' (#9) from chore/driver-standard into main
driver / standard (push) Successful in 13s
driver / lint (push) Successful in 11s
driver / types (push) Successful in 1m1s
driver / test (3.10) (push) Successful in 1m3s
driver / test (3.11) (push) Successful in 1m2s
driver / lowest (push) Successful in 28s
driver / test (3.12) (push) Successful in 1m4s
driver / test (3.13) (push) Successful in 54s
driver / build (push) Successful in 25s
driver / security (push) Successful in 1m7s
driver / publish (push) Failing after 24s
CI / driver (push) Failing after 21m59s
v0.3.0
2026-10-23 14:44:39 +00:00
Christian Manivong e8c09ac37c chore(release): 0.3.0
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 51s
driver / test (3.10) (pull_request) Successful in 57s
driver / test (3.11) (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 53s
driver / lowest (pull_request) Successful in 24s
driver / test (3.13) (pull_request) Successful in 47s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 3m8s
driver / publish (pull_request) Skipped
2026-10-23 16:01:56 +02:00
Christian Manivong aba36b3b11 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 55s
driver / test (3.10) (pull_request) Successful in 58s
driver / test (3.11) (pull_request) Successful in 56s
driver / lowest (pull_request) Successful in 26s
driver / test (3.12) (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 48s
driver / build (pull_request) Successful in 24s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 3m0s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; napalm-device-types and napalm-linux come from
  git until napalm-linux 0.15.0 is on PyPI.
- requires-python >=3.10 (napalm-device-types needs it), SPDX license
  string, setuptools>=77, LICENSE file, py.typed, links to git.netork.io.
- Dependencies: napalm-device-types>=4.22.0, napalm-linux>=0.15.0,
  napalm>=4.0 (tested at 4.0.0); dev extra with pytest, pytest-cov, mypy
  and ruff.
- mypy strict for the whole package, no exempt module: _omv_read is
  annotated as returning list[dict[str, Any]] (types only).
- Coverage floor 15 % (measured 15.89 %); the four long getters and the
  complexity of get_disks are recorded in the quality baseline.
- README (what it is, how it connects, the getters, what it does not do)
  and CHANGELOG are new.
- The committed egg-info and __pycache__ files are untracked; .gitignore
  from the template keeps them, .venv and build output out.
2026-10-23 12:07:04 +02:00
Christian Manivong 9fbbd17530 fix: what bandit and the remaining lint rules found
- 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.
2026-10-23 12:05:00 +02:00
Christian Manivong 6d82fad80a style: ruff format and the lint rules of the driver standard
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.
2026-10-23 12:04:32 +02:00
christianmanivong 5aa06a485d Merge pull request 'feat: drop the get_device_warnings override; the pending updates are the fact (0.2.0)' (#7) from feat/facts-not-warnings into master
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 28s
2026-10-17 08:34:57 +00:00
Christian Manivong 8b41a948be feat: drop the get_device_warnings override; the pending updates are the fact (0.2.0)
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 28s
CI / test (3.10) (pull_request) Successful in 26s
CI / test (3.11) (pull_request) Successful in 26s
CI / test (3.12) (pull_request) Successful in 27s
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).
2026-10-17 09:39:16 +02:00
christianmanivong 508f3dcb37 Merge pull request 'fix: opt out of the SSH hardening inherited from napalm-linux' (#3) from feat/ssh-algorithm-fix into master
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 26s
CI / test (3.12) (push) Successful in 29s
2026-10-11 21:25:11 +00:00
Christian Manivong f68c758338 fix: opt out of the SSH hardening inherited from napalm-linux
CI / test (3.10) (pull_request) Failing after 20s
CI / test (3.11) (pull_request) Failing after 18s
CI / test (3.12) (pull_request) Failing after 19s
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 29s
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
2026-10-11 23:12:34 +02:00
christianmanivong 5742349742 Merge pull request 'ci: run the tests and build the package on every push and pull request' (#2) from ci/workflow into master
CI / test (3.10) (push) Successful in 29s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 29s
2026-10-07 06:29:44 +00:00
Christian Manivong ca03b6dd99 ci: run the tests and build the package on every push and pull request
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 29s
CI / test (3.10) (pull_request) Successful in 28s
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 29s
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.
2026-10-07 07:52:44 +02:00
christianmanivong cfe730ccea Merge pull request 'feat: declare that upgrading everything must be a full upgrade on OpenMediaVault' (#1) from feat/full-upgrade into master 2026-10-06 10:27:22 +00:00
Christian Manivong d61086ff5f feat: declare that upgrading everything must be a full upgrade on OpenMediaVault
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).
2026-10-06 12:27:02 +02:00
Christian Manivong 0f57745725 refactor: inherit StorageDriver instead of working around it
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.
2026-08-21 12:50:27 +07:00
christianmanivong 67939ace75 fix: declare DEVICE_CLASS so the Storage tab is reachable
The driver inherits LinuxDriver for the OS surface and set TYPE_LABEL to
"Storage", but netOrk derives device_class from an issubclass chain that
reaches OSDriver before StorageDriver and returned "linux". The UI gates
the Storage tab on device_class === "storage", so an OMV device showed a
Storage label in the list and no Storage tab on the detail page — while
its disks, pools, volumes and shares were being collected and persisted
the whole time.

netOrk now honours an explicit DEVICE_CLASS attribute before falling back
to the chain, mirroring how it already honours TYPE_LABEL.

Refs christianmanivong/netork#111
2026-08-21 10:27:16 +07:00
Christian Manivong 5a9c360587 refactor(warnings): report raw signal only, no severity/presentation
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.
2026-07-20 09:54:07 +02:00
Christian ManivongandClaude Sonnet 4.6 7e8624a3dd feat: Fingerprint-Attribute für Discovery-Scoring
Ergänzt DRIVER_NAME, HTTP_FINGERPRINT, SNMP_FINGERPRINT, SSH_FINGERPRINT,
PORT_SPECS und SNMP_OBJECT_ID_PREFIX gemäß docs/DISCOVERY_FINGERPRINTING.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 14:47:08 +02:00
Christian ManivongandClaude Sonnet 4.6 46c4c13f3d feat: TYPE_LABEL = "Storage" replaces storage_device = True flag
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>
2026-06-24 11:38:36 +02:00
Christian Manivong 07b68cd73f fix: add missing docstrings on get_facts, get_replication_jobs, get_quotas 2026-06-13 03:21:07 +02:00
Christian Manivong 302c5b95cd init 2026-06-13 03:18:28 +02:00