Skip to content

Add Proxmox read client (BuildVMState, VMID scanning)

Aiho Tehisaru requested to merge feature/proxmox-client into trunk

Stacked on !1 (merged) (feature/foundations) — this package imports internal/config and internal/model from it, so it targets that branch until !1 (merged) merges, then should be retargeted to trunk.

Completes phase 2's read-only-clients scope: proxmox.BuildVMState resolves a live Proxmox VM into a model.VMState (cores, memory, primary disk, NICs, tags, notes, attached ISO), and UsedVMIDs/NextFreeVMID implement the "scan both /qemu and /lxc" + range-scan-direction logic from the existing manual provisioning workflow.

Deliberately not implemented (flagged in comments, not guessed)

  • Pending-vs-live config diffing (VMState.PendingChanges) — needs live verification of the real PVE API shape first.
  • Disk sizes in units other than whole GB — Hop179's convention is always whole-GB, documented as a known v1 gap rather than silently mishandled.

Test plan

  • gofmt -l . clean
  • go vet ./... clean
  • go build ./... succeeds
  • go test ./... — all tests pass (adds 10 new tests: 6 for BuildVMState/parsing, 4 for VMID scanning)

🤖 Generated with Claude Code

https://claude.ai/code/session_01U9buZPRQy7YXLodkSPFFik

Merge request reports

Loading