Skip to content

U3: swap storage.*/snapshot.* to v1 endpoints (follow-up to backend #99) #93

Description

@pparage

Problem

Follow-up to backend PR #99 (range42-backend-api). The new v1 Proxmox storage and per-VM snapshot endpoints exist, but the UI still calls the v0 equivalents.

Backend v1 endpoints now available

  • GET /v1/proxmox/hosts/{id}/storage
  • GET /v1/proxmox/hosts/{id}/storage/{store}/content?content=iso|vztmpl
  • POST /v1/proxmox/hosts/{id}/storage/{store}/download-url
  • GET/POST/DELETE /v1/proxmox/hosts/{id}/vms/{vmid}/snapshots[...]/rollback

Work (src/services/proxmox/api.ts)

  • storage.* (list/listIsos/listTemplates/downloadIso) → repoint to the v1 paths above; .items-unwrap the Page (mirror listHostVms); drop the proxmox_node arg (resolve host via getRegisteredHost()). Update useProxmoxStorage.ts + TemplateBrowser.vue.
  • snapshot.* (create/list/revert/delete) → repoint to the per-VM v1 snapshot endpoints. Note: the current per-VM snapshot UI is wired to deployment-scoped /v1/deployments/:id/snapshot, and runnerCalls/snapshots/* use an Ansible bundle path — decide which consumers move.
  • Add a per-VM snapshot section in ConfigPanel if per-node snapshot UX is wanted (currently none consumes the v1 per-VM endpoints).

Notes

  • Response shapes: StorageContent includes a derived name (PVE doesn't return it); pools expose storage/type/content/active.
  • Resolves the storage setConfig refactor surface (see the TemplateBrowser runtime-error issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions