Files
vmware-api-simulator/docs/ru/domains/storage.md
T
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

38 lines
2.2 KiB
Markdown

**Language / Язык:** [English](../../domains/storage.md) | [Русский](storage.md)
# Storage
Datastores, метаданные файлов datastore, устройства хранения host и storage
policies:
[`app/vsphere/rest/router.py`](../../../app/vsphere/rest/router.py),
[`content_rest.py`](../../../app/vsphere/rest/content_rest.py),
[`platform_rest.py`](../../../app/vsphere/rest/platform_rest.py),
[`app/vsphere/domain/content.py`](../../../app/vsphere/domain/content.py).
## Эндпоинты
| Метод | Путь | Заметки |
|---|---|---|
| GET | `/api/vcenter/datastore[/{datastore}]` | Type (`VMFS`/`NFS`), capacity, free space, `multiple_host_access` |
| GET/POST | `/api/vcenter/datastore/{datastore}/files` | Список / регистрация метаданных файлов (пути ISO, VMX, VMDK) |
| GET | `/api/vcenter/host/{host}/storage/storage-device` | Seeded local disk devices (`naa.*`, capacity, флаг SSD) |
| GET | `/api/vcenter/storage/policies[/{policy}/vm]` | Storage-based policy management, в т.ч. lab-политики `policy_type: VSAN` |
Legacy `GET /rest/vcenter/datastore` зеркалит список в конверте
`{ "value": … }`.
## Основные моменты
- Строки datastore засеваются реалистичными парами capacity/free-space
(`type`, `capacity`, `free_space`, `accessible`,
`multiple_host_access`) — см.
[`app/vsphere/profiles.py`](../../../app/vsphere/profiles.py).
- Метаданные файлов живут в `vsphere_datastore_files` (`path`, `size`, `type`);
seed заранее заполняет ISO и записи `.vmx`/`.vmdk` VM
(`seed_platform_extras`).
- Среди storage policies есть lab-политика с меткой vSAN `RAID1` — оговорку
по vSAN (seeded lab data, не реальный кластер vSAN) см. в таблице
«Platform surfaces» в [Покрытие API](../api-coverage.md).
- Устройства хранения host — синтетические диски на host, не реальные extents
ESXi VMFS; флаги capacity/SSD детерминированно зависят от индекса host.