Files
Christian Manivong 3a406b76e8 fix: read every share from OMV's own database, with its service, 0.4.0 (NetOrk/netork#3104)
get_shares() found no share at all: it asked for data models OMV does not have
(conf.service.nfs.shares and its siblings), without root although config.xml is
root's, without the full path although /usr/sbin is not on a login user's PATH,
and stored every failure as a NAS without shares. Samba shares were dropped for
want of a name of their own, and several NFS clients of one folder overwrote
each other.

Now every model is read through sudo in one round trip; a share takes its shared
folder's name; NFS is one share per folder with one access rule per client; each
share names its service (smbd, nfs-server, proftpd, rsync, tftpd-hpa) and what a
client names (/export/<folder> over NFS); rsync modules, the TFTP root and Samba's
homes are shares too; a read that fails raises.
2026-12-03 18:43:50 +01:00

81 lines
2.2 KiB
TOML

[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "napalm-openmediavault"
version = "0.4.0"
description = "NAPALM driver for OpenMediaVault NAS (SSH)"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
authors = [
{ name = "Christian Manivong", email = "christian@manivong.de" },
]
keywords = ["napalm", "network", "automation", "nas", "openmediavault", "omv", "storage"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Networking",
"Topic :: System :: Systems Administration",
"Typing :: Typed",
]
dependencies = [
"napalm>=4.0",
"napalm-device-types>=4.58.0", # NASShareDict service/export/access, ShareAccessDict
"napalm-linux>=0.27.0", # PosixSharesMixin under OmvSharesMixin
]
[project.optional-dependencies]
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
[project.entry-points."napalm.drivers"]
openmediavault = "napalm_openmediavault:OpenMediaVaultDriver"
[project.urls]
Repository = "https://git.netork.io/NAPALM/napalm-openmediavault"
Issues = "https://git.netork.io/NAPALM/napalm-openmediavault/issues"
Changelog = "https://git.netork.io/NAPALM/napalm-openmediavault/src/branch/main/CHANGELOG.md"
[tool.setuptools.packages.find]
where = ["."]
include = ["napalm_openmediavault*"]
[tool.setuptools.package-data]
napalm_openmediavault = ["py.typed"]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
[tool.ruff.lint.per-file-ignores]
# Recorded device output keeps its lines.
"tests/**" = ["E501"]
[tool.mypy]
python_version = "3.12"
strict = true
# napalm itself is untyped, so every driver subclasses Any.
disallow_subclassing_any = false
[[tool.mypy.overrides]]
module = ["napalm.*", "netmiko.*", "paramiko.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.coverage.run]
source = ["napalm_openmediavault"]
[tool.coverage.report]
fail_under = 15