f8d3cbdd59
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.
2.9 KiB
2.9 KiB
pulumi hybrid lab suite for vmware-api-simulator
Hybrid suite under pulumi-tests/:
- Official
pulumi-vsphere(SOAP/VIM via govmomi) - Full REST
IMPLEMENTED× majors 6–9 matrix (deep + stub response checks) - Deep REST CRUD (session / folder / tag / content library / VM)
- All SOAP WSDL ops advertised on
/sdk/vimService.wsdl
pulumi-vsphere alone cannot hit ~1092 REST routes — the HTTP matrix is required for full-surface confidence.
Pass rules
| Class | Pass rule |
|---|---|
| REST GET (inventory-critical / deep) | 2xx, body non-empty, not "stub": true on major 9 critical paths |
| REST stubs (universe) | no 5xx/501; response present; reported as stub (not claimed durable CRUD) |
| REST deep CRUD | create → GET nonempty → update (where supported) → delete → GET missing |
| SOAP WSDL ops (~45) | POST /sdk without 5xx; Create/Power/Clone/Destroy checked via inventory |
| pulumi-vsphere | existing cases + nonempty exports |
What runs
| Case | Layer | Notes |
|---|---|---|
PU-INV |
pulumi-vsphere | Inventory data sources |
PU-FOLDER |
pulumi-vsphere | Folder create/destroy |
PU-VM |
pulumi-vsphere | VirtualMachine create/destroy |
PU-TAG |
pulumi-vsphere | TagCategory + Tag |
PU-REST |
REST matrix | IMPLEMENTED × majors 6–9 (smoke: major 9 only) |
PU-CRUD |
REST CRUD | Session, folder, tagging, content library, VM |
PU-SOAP |
SOAP | All WSDL ops |
Artifacts: HTML + JSON + JUnit under the lab-reports volume. JSON includes
rest.total / rest.failed, crud.failed, soap.failed.
Quick start
From the repo root:
make pulumi-tests # full hybrid suite
make pulumi-tests-smoke # PU-INV + one-major REST smoke
Or from this directory:
cd pulumi-tests
make up
make test-pulumi # or: make test-pulumi-smoke
Gateway (in-compose): https://api-gateway (host map 127.0.0.1:18443).
Seed profile: small → Datacenter / Cluster / datastore1 / VM Network /
web-01 / esxi01.lab.local / /Datacenter/vm/production.
Make targets
| Target | Meaning |
|---|---|
make test-pulumi / pulumi-tests |
Full hybrid: pulumi-vsphere + REST×6–9 + CRUD + SOAP |
make test-pulumi-smoke |
PU-INV + REST major-9 smoke (no VM/tags/CRUD/SOAP) |
make up / down / seed |
Lab stack lifecycle |
Layout
pulumi-tests/
run_suite.py # Automation API + REST/SOAP probes
report_html.py
lib/assert_nonempty.py
lib/rest_matrix.py # IMPLEMENTED × majors
lib/rest_crud.py # deep create/read/update/delete
lib/soap_ops.py # WSDL SOAP ops
programs/inventory/
programs/folders/
programs/vm_lifecycle/
programs/tags/
docker/Dockerfile.pulumi-runner
docker-compose.yml
PYTHONPATH mounts /workspace so probes import app.vsphere.* coverage/matrix.