Files
inecs f8d3cbdd59 Initial commit: VMware vSphere API simulator scaffold.
Add the FastAPI app, PostgreSQL migrations, Docker/Helm packaging, API
contracts, docs, client examples, and the unit/integration/compatibility
test suite for local client and tooling labs without a real vCenter.
2026-07-18 04:42:11 +03:00

1.8 KiB

Language / Язык: English | Русский

Storage

Datastores, datastore file metadata, host storage devices, and storage policies: app/vsphere/rest/router.py, content_rest.py, platform_rest.py, app/vsphere/domain/content.py.

Endpoints

Method Path Notes
GET /api/vcenter/datastore[/{datastore}] Type (VMFS/NFS), capacity, free space, multiple_host_access
GET/POST /api/vcenter/datastore/{datastore}/files List / register file metadata (ISOs, VMX, VMDK paths)
GET /api/vcenter/host/{host}/storage/storage-device Seeded local disk devices (naa.*, capacity, SSD flag)
GET /api/vcenter/storage/policies[/{policy}/vm] Storage-based policy management, incl. policy_type: VSAN lab policies

Legacy GET /rest/vcenter/datastore mirrors the list in a { "value": … } envelope.

Highlights

  • Datastore rows are seeded with realistic capacity/free-space pairs (type, capacity, free_space, accessible, multiple_host_access) — see app/vsphere/profiles.py.
  • File metadata lives in vsphere_datastore_files (path, size, type); the seed pre-populates ISOs and a VM's .vmx/.vmdk entries (seed_platform_extras).
  • Storage policies include a lab RAID1 vSAN-labelled policy — see the "Platform surfaces" table in API coverage for the vSAN caveat (seeded lab data, not a real vSAN cluster).
  • Host storage devices are per-host synthetic disks, not real ESXi VMFS extents — capacity/SSD flags vary deterministically by host index.