Commit Graph
3 Commits
Author SHA1 Message Date
Christian Manivong fddf8af680 feat: Proxmox VE 9.3 API additions (NetOrk/netork#2728)
On a node running 9.3: HA maintenance over PUT /nodes/{node}/maintenance
(the target node's version decides, SSH below it), the guest uid in
get_vms, the cluster-id as ClusterDict.id, sync-time-on-resume on resume.
get_credential_expiry reads the expiry of the token or account the driver
logged in with; get_update_history lists the node's APT transactions.
Needs napalm-device-types 4.44.0.
2026-11-26 17:35:50 +01:00
Christian Manivong 93c974b8f0 feat(vm): resume a paused VM, and list it as paused (NetOrk/netork#2658)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 52s
driver / test (3.12) (pull_request) Successful in 1m1s
driver / test (3.13) (pull_request) Successful in 56s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 2m43s
driver / publish (pull_request) Skipped
suspend_vm paused a QEMU guest that nothing could bring back: start is
refused because PVE still says the guest is running. resume_vm posts
status/resume for a paused VM and refuses a container or a guest that is
not paused. get_vms() asks for the full status and reports a guest whose
qmpstatus is paused or suspended as paused, not running.
2026-11-25 21:28:46 +01:00
Christian Manivong dd48d3c1e5 feat: implement the HypervisorDriver VM contract
start_vm, stop_vm, reboot_vm, suspend_vm and get_vm_config existed only
as declarations. netOrk called Proxmox's own power_vm and read a VM's
raw config through _node_api(), so no other hypervisor could serve the
same endpoints. These let netOrk talk to every hypervisor alike.

The power methods accept a VM's name or vmid, wait for the Proxmox task,
and raise ValueError/RuntimeError as the contract says instead of
returning a result dict. A forced reboot of a container is stop + start,
since LXC has no reset; suspending a container is refused. power_vm is
unchanged for existing callers.

get_vm_config moves the config parsing netOrk did in
_parse_proxmox_hw_config into the driver and returns a VMConfigDict:
disks with storage and size, NICs with model, MAC, bridge and VLAN, CPU
topology, firmware, machine type and PCI/USB passthrough.

get_vms reports vmid as a string ("100"), following
napalm-device-types 2.0, still ordered numerically.
2026-09-24 09:06:59 +02:00