driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / test (3.13) (pull_request) Successful in 59s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m11s
CI / driver (pull_request) Successful in 2m41s
driver / publish (pull_request) Skipped
netOrk keeps one list of NTP servers and a time zone per site and aligns a device that differs (NetOrk/netork#2360, #2365). Both drivers now implement napalm-device-types' TimeSyncMixin (4.35.0) and write both values. Neither API keeps time servers: /nodes/{node}/time knows only the zone, and both products run chrony on Debian. The servers are therefore PosixTimeSyncMixin's, over the driver's existing SSH session (run_command, root): read from chrony's configuration, written to /etc/chrony/sources.d/netork.sources with every other source commented out, then a reload or a restart of chrony. The zone is read with them from the host (timedatectl: the zone the clock really runs in), and from GET /nodes/{node}/time only where the host names none. It is written through PUT /nodes/{node}/time rather than timedatectl set-timezone: Proxmox's own call validates the name and keeps /etc/timezone, which its web UI and API show, in step with /etc/localtime. One device is one node: in a PVE cluster every node has its own clock, and only the node this connection resolved is read and written. get_ntp_servers() read GET /nodes/{node}/ntp, a path Proxmox VE does not have, so it always reported no servers. It now reports what get_time_sync() reads, on the backup server too.
95 lines
2.6 KiB
TOML
95 lines
2.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=77"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "napalm-proxmox"
|
|
version = "0.10.0"
|
|
description = "NAPALM drivers for Proxmox VE (classic Linux networking, SDN, OVS) and Proxmox Backup Server"
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
authors = [{ name = "Christian Manivong" }]
|
|
keywords = ["napalm", "proxmox", "network", "sdn", "ovs", "automation"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: System Administrators",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: System :: Networking",
|
|
]
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"napalm>=5.0.0",
|
|
"napalm_device_types>=4.35.0", # TimeSyncMixin, PosixTimeSyncMixin
|
|
"paramiko>=5.0.0", # CVE-2026-44405; imported directly for the node's SSH session (_base.py)
|
|
"proxmoxer>=2.0.0",
|
|
"netaddr>=0.9.0",
|
|
"requests>=2.31.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8", "pytest-cov>=5", "mypy>=1.11", "ruff>=0.6"]
|
|
|
|
[project.entry-points."napalm.drivers"]
|
|
proxmox = "napalm_proxmox:ProxmoxDriver"
|
|
proxmox_backup = "napalm_proxmox:ProxmoxBackupDriver"
|
|
|
|
[project.urls]
|
|
Repository = "https://git.netork.io/NAPALM/napalm-proxmox"
|
|
Issues = "https://git.netork.io/NAPALM/napalm-proxmox/issues"
|
|
Changelog = "https://git.netork.io/NAPALM/napalm-proxmox/src/branch/main/CHANGELOG.md"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["napalm_proxmox*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
napalm_proxmox = ["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.*", "proxmoxer.*", "paramiko.*", "netaddr.*", "yaml.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
# Not yet under strict mypy (quality baseline); may only shrink.
|
|
module = [
|
|
"napalm_proxmox.config_mixin",
|
|
"napalm_proxmox.driver",
|
|
"napalm_proxmox.interfaces_mixin",
|
|
"napalm_proxmox.routing_mixin",
|
|
"napalm_proxmox.sdn_mixin",
|
|
"napalm_proxmox.system_mixin",
|
|
"napalm_proxmox.utils",
|
|
"napalm_proxmox.vm_contract_mixin",
|
|
"napalm_proxmox.vm_mixin",
|
|
"napalm_proxmox.vm_provision_mixin",
|
|
]
|
|
ignore_errors = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.coverage.run]
|
|
source = ["napalm_proxmox"]
|
|
|
|
[tool.coverage.report]
|
|
fail_under = 68
|