Commit Graph
139 Commits
Author SHA1 Message Date
Christian Manivong 0bb25a0c86 chore(release): 0.9.0
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / lowest (pull_request) Successful in 30s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 53s
CI / driver (pull_request) Successful in 2m30s
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m4s
driver / publish (pull_request) Skipped
2026-11-02 22:36:06 +01:00
christianmanivong c040dfdaa2 Merge pull request 'feat(pbs): Proxmox Backup Server as entry point proxmox_backup (#52)' (#53) from feat/proxmox-backup into main
driver / lint (push) Successful in 14s
driver / test (3.13) (push) Successful in 1m1s
driver / lowest (push) Successful in 34s
driver / build (push) Successful in 25s
driver / security (push) Successful in 59s
driver / publish (push) Skipped
driver / standard (push) Successful in 14s
driver / types (push) Successful in 58s
driver / test (3.12) (push) Successful in 1m8s
CI / driver (push) Successful in 2m15s
2026-11-02 21:35:53 +00:00
Christian Manivong 2b2cd9b867 feat(pbs): Proxmox Backup Server as entry point proxmox_backup (#52)
driver / test (3.13) (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 2m20s
driver / lint (pull_request) Successful in 14s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m5s
driver / publish (pull_request) Skipped
A second driver in this package, ProxmoxBackupDriver. Its API and web UI
are on 8007, not on PVE's 8006, and its node is always localhost; open()
proves the login with GET /version, so a bad token fails there.

Roles: BackupServerDriver (napalm-device-types 4.25.0) first, then
StorageDriver for the disks and ZFS pools the server manages. It reads
datastores, the backup groups of every namespace with their newest
snapshot, a group's snapshots, the GC, verify, prune, sync and tape jobs
with how their last run ended, and the remotes without their secrets;
it starts garbage collection and jobs, verifies, protects and deletes
snapshots, and follows the tasks. As a host it reports facts,
interfaces, CPU and memory, disks, pools, its pbs-subscription and the
same packages, updates, host readers and sshd hardening as a PVE node.

A privilege-separated token without an ACL entry gets an empty list from
PBS, not a refusal, so every read checks /access/permissions and raises
PermissionError. A removable datastore that is not mounted is reported
as unmounted and left out of the group listing.

The fixture is what a PBS 4.2 answered, sanitised; groups, snapshots and
jobs it did not have yet follow the API schema.
2026-11-02 22:29:21 +01:00
Christian Manivong 0b5f82cc02 refactor: share connection and Debian host code for a second product (#52)
Proxmox Backup Server speaks the same REST dialect, logs in the same way
and runs on Debian too, so what a second driver needs moves out of
ProxmoxDriver first:

- napalm_proxmox._base: the connection (proxmoxer service PVE or PBS,
  each with its port), the token split, the SSH session, run_command,
  the node helpers and the DMI read.
- napalm_proxmox.host_mixin: packages and APT updates, the subscription,
  restart and shutdown through the API, root file writes and the
  transports of the host readers (kernel, listening sockets, identity,
  systemd, host status, apt's proxy).

The PVE driver behaves as before; what it hands proxmoxer is pinned by
tests first, and it now names service="PVE" explicitly. get_packages is
split so the dpkg line parser stands alone; get_facts and get_packages
leave the quality baseline.
2026-11-02 22:29:04 +01:00
christianmanivong a4c220d2e3 Merge pull request 'feat(ssh): harden the node's sshd through a run_command channel (#50)' (#51) from feat/ssh-hardening into main
driver / lint (push) Successful in 14s
driver / lowest (push) Successful in 32s
driver / test (3.13) (push) Successful in 1m6s
driver / build (push) Successful in 26s
driver / security (push) Successful in 1m5s
driver / publish (push) Skipped
driver / standard (push) Successful in 15s
driver / test (3.12) (push) Failing after 5s
driver / types (push) Successful in 1m1s
CI / driver (push) Failing after 1m56s
2026-11-02 11:39:45 +00:00
christianmanivong 8521cff935 Merge remote-tracking branch 'origin/main' into feat/ssh-hardening
driver / test (3.13) (pull_request) Successful in 1m11s
driver / lowest (pull_request) Successful in 35s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m16s
CI / driver (pull_request) Successful in 3m4s
driver / standard (pull_request) Successful in 20s
driver / lint (pull_request) Successful in 17s
driver / test (3.12) (pull_request) Successful in 1m25s
driver / types (pull_request) Successful in 1m27s
driver / publish (pull_request) Skipped
2026-11-02 12:07:33 +01:00
christianmanivong 321cef3426 Merge pull request 'fix(lldp): read lldpd through the shared parser and raise on failure' (#46) from fix/lldp-keyvalue into main
driver / lint (push) Successful in 22s
driver / test (3.13) (push) Successful in 1m7s
driver / lowest (push) Successful in 39s
driver / build (push) Failing after 7s
driver / security (push) Successful in 1m27s
driver / publish (push) Skipped
driver / standard (push) Successful in 22s
driver / types (push) Successful in 1m7s
driver / test (3.12) (push) Successful in 1m13s
CI / driver (push) Failing after 3m24s
2026-11-02 11:06:19 +00:00
christianmanivong d4ed73c52b Merge remote-tracking branch 'origin/main' into feat/ssh-hardening
driver / test (3.13) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 39s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 3m7s
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m22s
driver / test (3.12) (pull_request) Successful in 1m27s
driver / publish (pull_request) Skipped
2026-11-02 12:02:12 +01:00
Christian Manivong 7259c842e3 Merge remote-tracking branch 'origin/main' into fix/lldp-keyvalue
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 2m44s
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / publish (pull_request) Skipped
2026-11-02 11:08:11 +01:00
christianmanivong a73dcf79fe Merge pull request 'fix: SSH only with the given credentials, quote the snippet path (#48, #47)' (#49) from fix/bugs-2026-11-02b into main
driver / lint (push) Failing after 7s
driver / test (3.13) (push) Successful in 1m7s
driver / lowest (push) Successful in 35s
driver / build (push) Successful in 37s
driver / security (push) Successful in 1m9s
driver / publish (push) Skipped
driver / standard (push) Successful in 17s
driver / types (push) Successful in 1m12s
driver / test (3.12) (push) Successful in 1m17s
CI / driver (push) Failing after 2m50s
2026-11-02 09:40:50 +00:00
christianmanivong ef1900c32a feat(ssh): harden the node's sshd through a run_command channel (#50)
driver / lowest (pull_request) Successful in 44s
driver / test (3.13) (pull_request) Successful in 1m23s
driver / build (pull_request) Successful in 34s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 2m55s
driver / standard (pull_request) Successful in 19s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m13s
driver / test (3.12) (pull_request) Successful in 1m23s
driver / publish (pull_request) Skipped
A Proxmox node runs Debian's stock OpenSSH, so OpenSshServerMixin works
there as on a plain Linux host. What it needed was run_command: an exec
channel on the node's SSH session, via napalm-device-types'
run_on_transport. The USES_SSH comment said there was no SSH session;
it now says what the flag means to netOrk.
2026-11-02 10:09:27 +01:00
Christian Manivong 4ffe93fe4c Merge remote-tracking branch 'origin/main' into fix/lldp-keyvalue
driver / test (3.12) (pull_request) Failing after 17s
driver / test (3.13) (pull_request) Failing after 15s
driver / lowest (pull_request) Failing after 18s
driver / security (pull_request) Failing after 37s
driver / build (pull_request) Successful in 33s
CI / driver (pull_request) Failing after 1m39s
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Failing after 27s
driver / publish (pull_request) Skipped
# Conflicts:
#	README.md
#	tests/test_misc.py
2026-11-02 09:29:44 +01:00
Christian Manivong dffb19e3df fix(vm-provision): quote the cloud-init snippet path in its root command
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 39s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m21s
CI / driver (pull_request) Successful in 3m1s
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m8s
driver / publish (pull_request) Skipped
_write_snippet put the snippet storage's path and the snippet's file
name unquoted into the command that writes the snippet as root on the
node; a space, ; or $(...) in either was acted on by the shell. Both now
go through shlex.quote, and a file name that is not one plain name
(a path, a shell character) is refused before anything runs.

Closes #47
2026-11-02 09:25:45 +01:00
Christian Manivong b3fe5009c8 fix(ssh): log in only with the credentials the driver is given
paramiko's look_for_keys and allow_agent stayed at their default True,
so the node login also tried every key in the running process's own
~/.ssh and any SSH agent it could reach. The driver standard lets a
driver authenticate only with what it was handed; both are now False
on every connect.

Closes #48
2026-11-02 09:25:04 +01:00
christianmanivong b368ad9856 Merge pull request 'fix: quote the cloud image URL, raise when a node command cannot run (#43, #17)' (#45) from fix/bugs-2026-11-02 into main
driver / lint (push) Successful in 17s
driver / lowest (push) Successful in 34s
driver / test (3.13) (push) Successful in 1m8s
driver / build (push) Successful in 29s
driver / security (push) Successful in 1m13s
driver / publish (push) Skipped
driver / standard (push) Successful in 17s
driver / types (push) Successful in 1m15s
driver / test (3.12) (push) Successful in 1m26s
CI / driver (push) Successful in 3m7s
2026-11-02 08:23:52 +00:00
Christian Manivong f93daa381e fix(lldp): read lldpd through the shared parser and raise on failure
driver / test (3.13) (pull_request) Failing after 17s
driver / lowest (pull_request) Failing after 18s
driver / security (pull_request) Failing after 45s
driver / build (pull_request) Successful in 35s
CI / driver (pull_request) Failing after 1m43s
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Failing after 29s
driver / test (3.12) (pull_request) Failing after 20s
driver / publish (pull_request) Skipped
lldpcli's text was read with 2>/dev/null || true, so lldpd not running,
lldpctl missing or the command not running at all came back as a node
without neighbours. Capabilities were lldpd's symbols lower-cased (tel,
wlan, docsis) rather than NAPALM's names.

The node now runs napalm-device-types' LLDPCTL_KEYVALUE_COMMAND, whose
output carries lldpctl's exit status; parse_lldpctl_keyvalue raises on a
failure, an empty answer raises too, and the lldp_neighbors projections
give NAPALM's capability names and the chassis MAC. The module is under
strict mypy now; the floor on napalm-device-types rises to 4.24.0.

Closes #44
2026-11-02 08:55:59 +01:00
Christian Manivong daf1b519eb fix(ssh): raise when a node command cannot run, drop the execute call
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 35s
driver / build (pull_request) Successful in 40s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Successful in 2m53s
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / publish (pull_request) Skipped
_exec_ssh_command returned "" on any failure (no SSH credential, a
refused login or host key, an unreachable node, a timeout), so a
getter that could not look read like one that found nothing; on
API-token-only nodes get_snmp_config answered None and the SSH-backed
getters empty lists on every poll. It now raises ConnectionException
with the cause (SshHostKeyMismatch as it is), and refuses before
connecting when there is neither a password nor a usable key.

It returned stderr when stdout was empty; output is stdout now. It
first posted every command to /nodes/{node}/execute, which runs a
batch of API calls rather than a shell; that dead round trip is gone.

The key types, the key before the password, the host-key check and the
single connect path were done in f491f9f and 6bb3035. The shared
transport is NAPALM/napalm-device-types#35.

Closes #17
2026-11-02 08:52:32 +01:00
Christian Manivong bfba804ec2 fix(vm-provision): quote the image URL in the node's root commands
The cloud-image download put image_url, hand-wrapped in single quotes,
and the cache path built from its basename unquoted into commands that
run as root on the node: a quote, $(...), ; or space in a URL from a
release feed was acted on by the shell. The URL and every path built
from it now go through shlex.quote (exists check, wget, mv, checksum,
rm, unpack, qm importdisk), and the cache file name keeps only the
characters Proxmox keeps in a content file name, as the import volume
name already did. The checksum algorithm is checked against the ones
Proxmox knows, since it is part of the command name.

The file-name helpers move to image_names.py; vm_provision_mixin.py
would otherwise cross the 1000-line limit. _download_cloud_image
drops below 50 lines, so its baseline entry goes.

Closes #43
2026-11-02 08:46:44 +01:00
christianmanivong 6a8132e234 Merge pull request 'fix: name the VM a failed create_vm_from_cloud_init leaves behind (#28)' (#41) from fix/half-built-vm-28 into main
driver / lint (push) Successful in 16s
driver / test (3.13) (push) Successful in 1m11s
driver / lowest (push) Successful in 46s
driver / build (push) Successful in 30s
driver / security (push) Successful in 1m13s
driver / publish (push) Skipped
driver / standard (push) Successful in 16s
driver / types (push) Successful in 1m2s
driver / test (3.12) (push) Successful in 1m21s
CI / driver (push) Successful in 2m40s
2026-11-01 23:57:55 +00:00
Christian Manivong 3233ee24a0 chore(deps): floor napalm-device-types at 4.23.0
driver / test (3.13) (pull_request) Successful in 1m9s
driver / test (3.12) (pull_request) Successful in 1m21s
driver / lowest (pull_request) Successful in 43s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m14s
CI / driver (pull_request) Successful in 2m47s
driver / standard (pull_request) Successful in 21s
driver / lint (pull_request) Successful in 24s
driver / types (pull_request) Successful in 1m12s
driver / publish (pull_request) Skipped
4.23.0 is on PyPI with everything this branch uses; the git pre-install
in CI is no longer needed.
2026-11-02 00:34:19 +01:00
Christian Manivong 0f1918f230 Merge remote-tracking branch 'origin/main' into fix/half-built-vm-28
# Conflicts:
#	CHANGELOG.md
#	tests/quality_baseline.json
2026-11-02 00:33:52 +01:00
christianmanivong a8d73d95b4 Merge pull request 'fix: twelve open bugs, set_vlan uplink first (#37, #30, #23, #22, #21, #20, #19, #18, #17, #15, #12, #3)' (#40) from fix/bugs-2026-11 into main
driver / lint (push) Successful in 14s
driver / lowest (push) Successful in 37s
driver / test (3.13) (push) Successful in 1m24s
driver / build (push) Successful in 28s
driver / security (push) Successful in 1m17s
driver / publish (push) Skipped
driver / standard (push) Successful in 17s
driver / types (push) Successful in 1m27s
driver / test (3.12) (push) Successful in 1m43s
CI / driver (push) Successful in 3m33s
2026-11-01 22:50:18 +00:00
christianmanivong 8dad7c3767 Merge pull request 'feat: HA state, backups and votes in get_clusters(); migrate_vm, preflight, maintenance' (#42) from feat/vm-lifecycle into main
driver / lint (push) Successful in 16s
driver / test (3.13) (push) Successful in 1m18s
driver / lowest (push) Successful in 1m0s
driver / build (push) Successful in 38s
driver / security (push) Successful in 1m31s
driver / publish (push) Skipped
driver / standard (push) Successful in 18s
driver / types (push) Successful in 1m12s
driver / test (3.12) (push) Successful in 1m20s
CI / driver (push) Successful in 3m16s
2026-11-01 22:02:36 +00:00
Christian Manivong 0704d9a102 feat: HA state, backups and votes in get_clusters(); migrate_vm, preflight, maintenance
driver / test (3.12) (pull_request) Successful in 1m10s
driver / test (3.13) (pull_request) Successful in 1m3s
driver / lowest (pull_request) Successful in 33s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m27s
CI / driver (pull_request) Successful in 3m4s
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m3s
driver / publish (pull_request) Skipped
get_clusters() reads /cluster/ha/* (PVE 8 and 9), /cluster/backup with pool
members, the newest backup per guest on each backup storage (PBS included) and
/cluster/config/nodes votes; each read is best-effort. migrate_vm() moves a
guest of the connected node and follows the task (HA-managed guests through
the HA manager), raising with the task log's ERROR lines;
get_vm_migration_preflight() maps PVE's own pre-flight; set_node_maintenance()
runs ha-manager over SSH.

Part of NetOrk/netork#1820 (stage 7: #759, #760, #761).
2026-11-01 22:15:01 +01:00
Christian Manivong 61821cd607 fix: name the VM a failed create_vm_from_cloud_init leaves behind
driver / lowest (pull_request) Failing after 5s
driver / test (3.13) (pull_request) Failing after 58s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Failing after 2m49s
driver / standard (pull_request) Successful in 19s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m5s
driver / test (3.12) (pull_request) Failing after 1m6s
driver / publish (pull_request) Skipped
A failure after the VM shell existed (disk import, NIC or snippet config,
start) raised without the VMID, so the caller could not remove the
half-built VM and it stayed on the node. It now raises napalm-device-types'
VMProvisionIncomplete with vmid and node, the failure as its cause. A
failure before the shell exists raises as before.

The NIC config strings are built by a helper of their own, which keeps
create_vm_from_cloud_init within its quality baseline.

Closes #28
2026-11-01 22:11:13 +01:00
Christian Manivong 8ef880b73b fix(hostname): refuse to rename a clustered node
driver / lowest (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 1m21s
driver / build (pull_request) Successful in 38s
driver / security (pull_request) Successful in 1m20s
CI / driver (pull_request) Successful in 3m12s
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m20s
driver / test (3.12) (pull_request) Successful in 1m26s
driver / publish (pull_request) Skipped
The rename moves /etc/pve/nodes/<old> while the node still runs as <old>,
which Proxmox does not support for a cluster member. set_hostname now
checks for a corosync.conf first and raises before touching anything on
a member, or when the check cannot be read; a single node renames as
before.

The check is the file, not `pvecm status`: pvecm decides membership by
/etc/pve/corosync.conf itself, and its status also fails on a member
whose corosync is down. /etc/corosync/corosync.conf covers a member
whose /etc/pve is not mounted.

Closes #21
2026-11-01 22:08:54 +01:00
Christian Manivong 9c7b64ba64 fix(vm-provision): say why a cloud-image download failed, drop its tmp
driver / test (3.13) (pull_request) Successful in 1m26s
driver / lowest (pull_request) Successful in 37s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m11s
CI / driver (pull_request) Successful in 3m19s
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m29s
driver / test (3.12) (pull_request) Successful in 1m39s
driver / publish (pull_request) Skipped
wget ran with -q, so a failure carried no reason, and a failed
download left its partial .tmp in the cache, taking the same space
again on every retry. wget now runs with -nv and the .tmp is removed
on failure, keeping wget's exit status.

Closes #3
2026-11-01 21:57:36 +01:00
Christian Manivong 10cf788b86 fix(ping): parse each reply into results
The probe pattern expected "from" after icmp_seq, but iputils prints
"bytes from <ip>: icmp_seq=... time=... ms", so results was always
empty. Replies by name ("from host (ip)") and over IPv6 are read too.

Closes #12
2026-11-01 21:57:36 +01:00
Christian Manivong 29ed59c8d1 fix(vm-provision): wait for destroy_vm's delete task
DELETE /nodes/{node}/qemu/{vmid} starts a task and returns its UPID;
destroy_vm ignored it and returned while the VM could still exist, and
a failed delete went unnoticed. The task is now awaited. Reading the
snippets before the delete, the issue's first point, was fixed in
ecff2b4.

Closes #15
2026-11-01 21:57:36 +01:00
Christian Manivong f491f9f9ec fix(ssh): log in with any key type, the key before the password
Only RSA keys were read, and a key was used only when no password was
set; with the API password always present it never was. The key is now
read as Ed25519, ECDSA or RSA and offered first, the password second.

The rest of the issue (the API exec branch, errors read as empty
output) belongs to the shared transport of NAPALM/napalm-device-types#35.

Refs #17
2026-11-01 21:57:36 +01:00
Christian Manivong 5195cebfca fix(ntp): read chrony's sources in get_ntp_stats
The getter ran "chronyc tracking || ntpq -pn" and parsed ntpq's format.
Proxmox VE ships chrony, so ntpq never ran and nothing matched. chrony
is now read in CSV mode (sources plus sourcestats); ntpq stays the
fallback and keeps peers without a tally mark.

Closes #18
2026-11-01 21:52:03 +01:00
Christian Manivong 4ee74e4b3d fix(users): list real login accounts and read admins from the ACL
The passwd filter's precedence was inverted: it listed uid < 1000
(daemon, bin, ...) and skipped regular users. The level check looked
for "Administrator" in the user record, which never names roles. The
level now comes from /access/acl (Administrator on /, by user or
group), root@pam always 15.

Closes #19
2026-11-01 21:50:16 +01:00
Christian Manivong 037a725b74 fix(updates): report a failed apply_updates as a failure
apt-get ran with "|| true" and the result was always success, so a
failed upgrade read as done. The exit status is read now and a failure
names it.

Closes #20
2026-11-01 21:48:48 +01:00
Christian Manivong 8f10bef7c5 fix(hostname): rename only the node's own names in /etc/hosts
The rename replaced \b<old>\b, which also matches before "." and "-":
"pve.old.lan pve" became "new.dom.old.lan new.dom" and "pve-backup"
became "new-backup". Whole whitespace-separated names are renamed now,
comments left alone.

The live move of /etc/pve/nodes/<old> the issue also asks about is not
changed here; it needs a decision on clustered nodes.

Refs #21
2026-11-01 21:48:06 +01:00
Christian Manivong 89c70d85be fix(lldp): keep every neighbour of a port apart
lldpcli prints one Interface block per neighbour. The summary parser
reused the port's last entry, so a second neighbour overwrote the
first, and a neighbour without SysName was dropped. Each block now
starts an entry of its own.

Closes #22
2026-11-01 21:46:51 +01:00
Christian Manivong 0779695349 fix(vm-provision): pass every SSH key, one per line
Proxmox's sshkeys holds one OpenSSH key per line, URL-encoded. The keys
were joined with ";", so only the first one worked, and quote() kept
"/" unescaped, which Proxmox's urlencoded format refuses.

Closes #23
2026-11-01 21:45:49 +01:00
Christian Manivong 52d63eb689 fix(snmp): let the snmpd.conf write report its exit status
The write ended in `exit $s`, which ends the shell inside the braces
_rc wraps around every command, so __PVE_RC was never printed and the
step always failed. The write now shares the apt file writer, which
ends in a test instead of exit.

Closes #30
2026-11-01 21:44:23 +01:00
Christian Manivong d142db73e5 fix(sdn): restore the virtual interface prefixes for set_vlan
b1ba991 removed _VIRTUAL_IFACE_PREFIXES while _is_physical_uplink still
read it. The AttributeError was swallowed by _find_switch_uplink, so
set_vlan never found an uplink on any node. Restore the constant and
cover both helpers with tests.

Closes #37
2026-11-01 21:43:09 +01:00
christianmanivong cb29a42c31 Merge pull request 'feat: get_clusters() for the whole cluster, node= refused for another node' (#39) from feat/cluster-inventory into main
driver / lint (push) Successful in 13s
driver / lowest (push) Successful in 39s
driver / test (3.13) (push) Successful in 1m6s
driver / build (push) Successful in 26s
driver / security (push) Successful in 1m10s
driver / publish (push) Skipped
driver / standard (push) Successful in 15s
driver / test (3.12) (push) Failing after 6s
driver / types (push) Successful in 1m4s
CI / driver (push) Failing after 2m8s
2026-11-01 19:06:53 +00:00
Christian Manivong 25369df572 refactor: import the cluster shapes from the package root
driver / test (3.12) (pull_request) Successful in 1m16s
driver / test (3.13) (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 34s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m21s
CI / driver (pull_request) Successful in 2m58s
driver / standard (pull_request) Successful in 19s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m10s
driver / publish (pull_request) Skipped
napalm-device-types keeps them in a module of their own now; the package exports them.

Refs NetOrk/netork#484
2026-11-01 17:08:10 +01:00
Christian Manivong f60532e434 feat: get_clusters() for the whole cluster, node= refused for another node
driver / test (3.13) (pull_request) Successful in 57s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 1m3s
CI / driver (pull_request) Failing after 2m42s
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Failing after 1m2s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / publish (pull_request) Skipped
Every PVE node can read its whole cluster, so get_clusters() reports the
one it belongs to: name and quorum from /cluster/status, every member
(offline ones as offline, without capacity), CPU and memory from
/cluster/resources and each online node's cpuinfo, maintenance from the
HA manager where it can be read, storages grouped by name with the nodes
they are available on, and bridges and vnets with the nodes that carry
them. A standalone node is a cluster of one.

The bridge part of get_network_targets() moved to network_targets.py so
both use it. create_vm_from_cloud_init() takes node= and refuses any node
but its own before creating anything.

Refs NetOrk/netork#484, NetOrk/netork#1822
2026-11-01 16:38:38 +01:00
christianmanivong d8ac209fb9 Merge pull request 'feat: get_network_targets names each bridge's uplinks (NetOrk/netork#1325)' (#38) from feat/network-target-uplinks into main
driver / lint (push) Successful in 16s
driver / test (3.13) (push) Successful in 1m7s
driver / lowest (push) Successful in 34s
driver / build (push) Successful in 47s
driver / security (push) Successful in 1m23s
driver / publish (push) Skipped
driver / standard (push) Successful in 20s
driver / types (push) Failing after 6s
driver / test (3.12) (push) Successful in 1m12s
CI / driver (push) Failing after 2m56s
2026-10-30 09:20:32 +00:00
christianmanivong d5ae2e2915 Merge pull request 'fix: an unknown IPv6 neighbour age is -1.0, not 0.0' (#36) from fix/arp-unknown-age into main
driver / lint (push) Successful in 15s
driver / test (3.13) (push) Successful in 1m35s
driver / lowest (push) Successful in 36s
driver / build (push) Successful in 36s
driver / security (push) Successful in 1m27s
driver / publish (push) Skipped
driver / standard (push) Successful in 18s
driver / types (push) Successful in 1m32s
driver / test (3.12) (push) Successful in 1m36s
CI / driver (push) Successful in 3m37s
2026-10-30 09:11:46 +00:00
Christian Manivong 72c30dd4c2 feat: get_network_targets names each bridge's uplinks (NetOrk/netork#1325)
driver / test (3.13) (pull_request) Successful in 1m11s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 37s
driver / security (pull_request) Successful in 1m21s
CI / driver (pull_request) Successful in 3m5s
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m7s
driver / test (3.12) (pull_request) Successful in 1m15s
driver / publish (pull_request) Skipped
netOrk's VM dialog follows a bridge's physical NICs to the switch port
behind it, to warn when a VM without a VLAN tag would land nowhere. The
driver knows those NICs from the node's network config.

uplinks is read from bridge_ports (Linux bridge) or ovs_ports (OVS
bridge), one group per bridge port: a bond (slaves / ovs_bonds) as its
NICs together, a NIC alone. Internal ports (OVSIntPort) and VLAN
subinterfaces leave out, as they never carry the bridge's untagged
traffic to the switch. A port missing from the config or of a kind the
driver cannot place leaves the key out rather than guessing.
2026-10-30 09:28:07 +01:00
Christian Manivong cc9752499e fix: an unknown IPv6 neighbour age is -1.0, not 0.0
driver / test (3.13) (pull_request) Successful in 59s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 39s
driver / security (pull_request) Successful in 1m17s
CI / driver (pull_request) Successful in 2m50s
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 1m5s
driver / publish (pull_request) Skipped
get_ipv6_neighbors_table reports ARP_AGE_UNKNOWN, as get_arp_table already
did, instead of 0.0 ("confirmed just now").

NetOrk/netork#1327
2026-10-30 08:37:08 +01:00
christianmanivong d577e7aae2 Merge pull request 'chore: Python 3.12 is the floor (NAPALM/driver-standard#6)' (#35) from chore/python-312-floor into main
driver / lint (push) Successful in 13s
driver / test (3.13) (push) Successful in 1m1s
driver / lowest (push) Successful in 33s
driver / build (push) Successful in 31s
driver / security (push) Successful in 1m14s
driver / publish (push) Skipped
driver / standard (push) Successful in 17s
driver / types (push) Successful in 1m3s
driver / test (3.12) (push) Successful in 1m10s
CI / driver (push) Successful in 2m54s
2026-10-27 09:46:57 +00:00
Christian Manivong 739d12a3db chore: Python 3.12 is the floor (NAPALM/driver-standard#6)
driver / lowest (pull_request) Successful in 32s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m25s
CI / driver (pull_request) Successful in 3m1s
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / publish (pull_request) Skipped
netOrk runs every driver in its own containers on Python 3.12, so 3.10
and 3.11 are no longer supported or tested. requires-python, mypy and
ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite.
2026-10-27 10:18:59 +01:00
christianmanivong 8205829437 Merge pull request 'feat: shutdown_host and begin_stop_vm through the API' (#34) from feat/shutdown-requests into main
driver / lint (push) Successful in 15s
driver / test (3.11) (push) Successful in 1m19s
driver / lowest (push) Successful in 36s
driver / test (3.13) (push) Successful in 1m4s
driver / build (push) Successful in 30s
driver / security (push) Successful in 1m10s
driver / publish (push) Skipped
driver / standard (push) Successful in 17s
driver / types (push) Successful in 1m10s
driver / test (3.10) (push) Successful in 1m18s
driver / test (3.12) (push) Successful in 1m9s
CI / driver (push) Successful in 3m38s
2026-10-27 07:41:23 +00:00
Christian Manivong 16f1b87392 feat: shutdown_host and begin_stop_vm through the API
driver / test (3.10) (pull_request) Successful in 1m9s
driver / test (3.11) (pull_request) Successful in 1m8s
driver / lowest (pull_request) Successful in 34s
driver / test (3.12) (pull_request) Successful in 1m3s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m1s
CI / driver (pull_request) Successful in 3m17s
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 1m2s
driver / publish (pull_request) Skipped
shutdown_host() posts command=shutdown to the node itself; its guests
stop as on any shutdown. begin_stop_vm(name) asks a guest for its clean
shutdown and returns once Proxmox took it, without waiting for the
task: the caller reads get_vm_status until it stopped. Both raise
RuntimeError when Proxmox refuses; an unknown guest is a ValueError.

The contracts HostShutdownMixin and VmStopRequestMixin of
napalm-device-types (NAPALM/napalm-device-types#55); for netOrk's graph
workflows (NetOrk/netork#1636).
2026-10-27 00:39:17 +01:00
christianmanivong f3639d9990 Merge pull request 'chore: adopt the NAPALM driver standard' (#33) from chore/driver-standard into main
driver / lint (push) Successful in 17s
driver / test (3.11) (push) Successful in 1m23s
driver / lowest (push) Successful in 42s
driver / test (3.13) (push) Successful in 1m9s
driver / build (push) Successful in 32s
driver / security (push) Successful in 1m10s
driver / publish (push) Successful in 32s
driver / standard (push) Successful in 17s
driver / types (push) Successful in 1m8s
driver / test (3.10) (push) Successful in 1m26s
driver / test (3.12) (push) Successful in 1m14s
CI / driver (push) Successful in 4m6s
v0.8.0
2026-10-23 12:17:27 +00:00