driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m3s
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 / 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).
11 KiB
11 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Changed
- Python 3.12 is the floor (
requires-python = ">=3.12"): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).
Added
get_clusters()reports quorumvotesper node (/cluster/config/nodes), the guests HA manages inha_resources(/cluster/ha/resources, the CRM state and node from/cluster/ha/status/current, the ids of the PVE 9 HA rules that name each from/cluster/ha/rules,[]on PVE 8), the vzdump jobs inbackup_jobs(/cluster/backup; a pool job lists the pool's guests from/pools?poolid=, or/pools/{pool}before PVE 8.1; oldstarttime/dowjobs get the schedule PVE itself derives) and per guest and storage the newest backup inbackups(each storage with backup content read once if shared, on each node if local; PBS included). Each is best-effort: one that cannot be read is None and the rest of the report stands.get_vm_migration_preflight(name): a VM's nodes and blockers fromGET .../qemu/{vmid}/migratein plain words, a local ISO in a CD drive as a blocking resource, the cloud-init drive left out; a container's candidates are the online members, its local volumes and unshared bind mounts read from its config. An offline member is refused as"node offline"for both.migrate_vm(name, target_node, online=True, target_storage=None, timeout=3600):POST .../{qemu|lxc}/{vmid}/migrate(onlinefor a running VM,with-local-diskswhen it has local disks, restart mode for a running container), followed to the end; a failure raises with the task log'sERROR:lines. A target that is not another cluster member is refused before the API is called. A guest HA manages is followed through the HA manager until it is on the target.set_node_maintenance(node, enabled):ha-manager crm-command node-maintenanceover the driver's SSH session, for a cluster member only and quoted; raises RuntimeError when SSH is not available. Needs the shapes and contracts of the next napalm-device-types release for type checking (runtime imports none).get_clusters(): the cluster the node belongs to, always exactly one, read from/cluster/status,/cluster/resources, each online node's status and network, SDN vnets/zones and the HA manager. Every member is listed, an offline one withstatus"offline"and no capacity;maintenanceis None when the HA manager cannot be read. Storages are grouped by name with the nodes they are available on (size: one node's figure for a shared storage, the sum over its nodes for a local one); bridges are merged across nodes, VLAN aware only if they are on every node; a vnet is on its zone's nodes. A standalone node is a cluster of one without a name.create_vm_from_cloud_init()takesnodeand raises ValueError, before creating anything, for a node other than its own (NetOrk/netork#484, NetOrk/netork#1822). Needs the cluster models andget_clusters()contract of napalm-device-types.get_network_targets()names each bridge's physical NICs inuplinks, read frombridge_ports/ovs_ports, one group per bridge port: a bond's slaves together, a NIC alone, without internal ports (OVSIntPort) and VLAN subinterfaces. Left out when a port is missing from the node's network config or of a kind it cannot place (NetOrk/netork#1325). Needs theuplinksfield of napalm-device-types'NetworkTargetDict.shutdown_host(): the node shuts itself down through the API (POST /nodes/{node}/status command=shutdown), andbegin_stop_vm(name): a guest's clean shutdown, returning once Proxmox took it instead of waiting for the task — the contractsHostShutdownMixinandVmStopRequestMixinof napalm-device-types (NetOrk/netork#1636).
Fixed
get_ipv6_neighbors_table()reports an unknown age as-1.0, asget_arp_table()already did (napalm-device-types'ARP_AGE_UNKNOWN), instead of0.0, which means "confirmed just now" (NetOrk/netork#1327).
[0.8.0] - 2026-10-23
The first release on PyPI. It collects everything since 0.1.0.
Changed
- The driver follows the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the
tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and
a build check, and a release tag publishes to PyPI. The package now ships
py.typed. Python 3.9 is no longer supported; napalm-device-types never ran on it. - Exceptions the driver deliberately ignores (closing the node's SSH session, the
is_alive()probe) are now logged at debug level. - The project links point at git.netork.io.
Added
- apt's proxy (napalm-device-types'
AptProxyMixin, NetOrk/netork#1397):get_package_proxy(),get_package_proxy_report(),check_package_proxy(url, expect)and the fixconfigure_package_proxy(url), as on any Debian host. The node is logged in as root, so the file is written and other proxy lines are commented out over the exec path. Requires napalm-device-types 4.22.0; version 0.7.0. get_service_packages()(napalm-device-types'ServicePackagesMixin, NetOrk/netork#1236): which installed packages each systemd unit of the node is made of — the one shipping its unit file and the one shipping itsExecStartbinary. Read-only, over the exec path. Requires napalm-device-types 4.20.0; version 0.6.0.
Security
- The node's SSH session (the fallback for node commands and the provisioning steps) verifies its host key (NetOrk/netork#1167): the key the caller expects for port 22 in
optional_args["ssh_host_keys"], else the first one; every key seen goes tooptional_args["ssh_host_key_observer"]. A changed key is refused before any login: a provisioning step fails, a best-effort read returns nothing. Both paths now share one session (_node_ssh). Replaces paramiko'sAutoAddPolicy. Requires napalm-device-types 4.19.0; version 0.5.0.
Changed
- Breaking:
get_device_warningsis gone; the node reports facts and the caller names the warnings (netOrk #1111). lldpd and the pending updates were already facts (get_packages,get_available_updates). The subscription is nowget_licenses()(napalm-device-types 4.14LicenseMixin): onepve-subscriptionentry with the API's status as aLicenseStatus(notfound→none,newandsuspended→unknown), its message asdetail, product name and due date when subscribed. The old check compared againstNotFoundwhile the API answersnotfound, so it never fired. Requires napalm-device-types 4.14.0; version 0.4.0. - Breaking:
run_device_action(fix_snmp,install_lldpd) is gone. The driver implements napalm-device-types 4.13's fix templates:configure_snmp_agent(settings)with the caller's community and allowed sources (onerocommunityline each, ufw only for those sources, no fixed temp file),get_management_peer(), andinstall_package(name)as the contract says, soensure_packagecomes from the base package. Every step reads its exit status. Requires napalm-device-types 4.13.0; version 0.3.0.
Added
get_system_identity()(napalm-device-types 4.9SystemIdentityMixin): the node's SMBIOS system UUID, product serial and board serial over the exec path, vendor placeholders empty. netOrk matches a server to its BMC on these. Requires napalm-device-types 4.9.0; version 0.2.0.- FreeBSD and OpenBSD guests:
create_vm_from_cloud_init(guest_os=...)withGUEST_AGENTSfrom napalm-device-types 3.0. A BSD guest gets OS typeotherand a network-config v2 snippet of its own (cicustom network=), because FreeBSD's nuageinit skips runcmd on the v1 Proxmox generates. OpenBSD's agent runs over ISA serial behindserial0, as the image keeps its console on com0. An unknownguest_osis refused before anything is created. - Packed cloud images (FreeBSD's
.qcow2.xz) are unpacked on the node after the packed file's checksum is verified; only the unpacked file is cached. Proxmox'sdownload-urlunpacks ISOs only, so they always go over SSH.
Fixed
get_vm_statusno longer reports a loopback address as the VM's IP when the agent lists loopback under another name thanlo(lo0on the BSDs, listed first by OpenBSD).destroy_vmreads the VM's cloud-init snippets before deleting the VM, and removes all of them; it read them afterwards, when the config was gone (#15).- Cloud images for
create_vm_from_cloud_initare downloaded by Proxmox itself when the node has an active storage with content typeimport(Proxmox 8.2+):download-urlwith checksum verification, thenimport-fromas the root disk. The image no longer passes through the node's root filesystem. Files are namednetork-<url hash>-<name>.<qcow2|raw|vmdk>and reused; Ubuntu's.imgis stored as.qcow2. Without such a storage, or for an image type Proxmox cannot import, the SSH download into/var/lib/vz/template/netork-imagesis used as before. HypervisorDrivercontract methodsstart_vm,stop_vm,reboot_vm,suspend_vmandget_vm_config. They accept a VM's name or vmid, raiseValueError/RuntimeErrorinstead of returning a result dict, and wait for the Proxmox task to finish.power_vmis unchanged.- Snapshot methods
get_vm_snapshots,create_vm_snapshot,delete_vm_snapshot,rollback_vm_snapshotfor VMs and containers (containers never save RAM state). reboot_host()restarts the node through the API instead of SSH.
Changed
get_vms()reportsvmidas a string ("100"), following napalm-device-types 2.0. Ordering stays numeric.
[0.1.0] - 2024-01-01
Added
- Initial release of the Proxmox VE NAPALM driver
- Support for classic Linux networking (
/etc/network/interfaces, Linux bridges) - Support for Proxmox SDN (zones: VLAN, QinQ, VXLAN, EVPN; VNets and subnets)
- Support for Open vSwitch (OVS) bridges, bonds, and internal ports
- Password and API token authentication via
proxmoxer - Implemented NAPALM methods:
open,close,is_aliveget_factsget_interfaces,get_interfaces_ip,get_interfaces_countersget_environment(CPU, memory, temperature sensors)get_arp_table(via/proc/net/arp)get_mac_address_table(Linux bridge fdb + OVS appctl)get_vlans(SDN VNet tags +bridge vlan show)get_network_instances(SDN zones as NAPALM network instances)get_ntp_servers,get_ntp_statsget_snmp_informationget_usersget_config,load_merge_candidate,load_replace_candidatecompare_config,commit_config,discard_config,rollbackget_lldp_neighbors,get_lldp_neighbors_detailget_ipv6_neighbors_tableping,traceroute,cliget_route_to
- 149 unit tests with ~79% code coverage
- Full type annotations