feat: HA state, backups, quorum votes, migrate_vm and node maintenance #71

Merged
christianmanivong merged 1 commits from feat/vm-lifecycle into main 2026-11-01 21:48:11 +00:00
Owner

Summary

Stage 7 of NetOrk/netork#1820: the hypervisor contract learns HA state, backups, quorum votes, live migration and node maintenance.

Changes

  • ClusterDict may carry ha_resources (HAResourceDict), backup_jobs (BackupJobDict) and backups (BackupDict, newest per guest and storage); ClusterNodeDict.votes. All NotRequired; None = not read, [] = read, nothing there.
  • HypervisorDriver declares get_vm_migration_preflight() (MigrationPreflightDict in the new vm_migration.py), migrate_vm(name, target_node, online, target_storage, timeout) and set_node_maintenance(node, enabled) under TYPE_CHECKING, so netOrk probes them with hasattr.
  • Exported from the package root; CHANGELOG under Unreleased.

Testing

  • 1049 passed, coverage 95.78 %; ruff, mypy strict, napalm-standard check and ratchet green.

Merge before NAPALM/napalm-proxmox (same branch name) and before netOrk re-pins. PyPI release still pending (#69).

## Summary Stage 7 of NetOrk/netork#1820: the hypervisor contract learns HA state, backups, quorum votes, live migration and node maintenance. ## Changes - `ClusterDict` may carry `ha_resources` (`HAResourceDict`), `backup_jobs` (`BackupJobDict`) and `backups` (`BackupDict`, newest per guest and storage); `ClusterNodeDict.votes`. All `NotRequired`; None = not read, [] = read, nothing there. - `HypervisorDriver` declares `get_vm_migration_preflight()` (`MigrationPreflightDict` in the new `vm_migration.py`), `migrate_vm(name, target_node, online, target_storage, timeout)` and `set_node_maintenance(node, enabled)` under TYPE_CHECKING, so netOrk probes them with hasattr. - Exported from the package root; CHANGELOG under Unreleased. ## Testing - 1049 passed, coverage 95.78 %; ruff, mypy strict, `napalm-standard check` and `ratchet` green. Merge before NAPALM/napalm-proxmox (same branch name) and before netOrk re-pins. PyPI release still pending (#69).
christianmanivong added 1 commit 2026-11-01 21:15:25 +00:00
feat: HA state, backups, quorum votes, migrate_vm and node maintenance
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 59s
driver / lowest (pull_request) Successful in 30s
driver / test (3.13) (pull_request) Successful in 58s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m3s
CI / driver (pull_request) Successful in 2m30s
driver / publish (pull_request) Skipped
a6289cb24a
get_clusters() may also report the cluster's HA resources, backup jobs, the
newest backup per guest and storage, and each node's quorum votes (all
NotRequired; None means not read). HypervisorDriver declares
get_vm_migration_preflight(), migrate_vm() and set_node_maintenance(); the
preflight shape lives in vm_migration.py.

Part of NetOrk/netork#1820 (stage 7: #759, #760, #761).
christianmanivong merged commit 9c3be46d8a into main 2026-11-01 21:48:11 +00:00
christianmanivong deleted branch feat/vm-lifecycle 2026-11-01 21:48:11 +00:00
Sign in to join this conversation.