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.
This commit is contained in:
2026-07-18 04:42:11 +03:00
commit f8d3cbdd59
422 changed files with 361335 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
# pulumi-vsphere lab suite (containers only).
COMPOSE ?= docker compose
COMPOSE_FILE ?= docker-compose.yml
COMPOSE_CMD = $(COMPOSE) -f $(COMPOSE_FILE)
PROFILE = --profile test
.PHONY: help up down build seed test-pulumi-smoke test-pulumi pulumi-tests \
test-smoke-all test-all clean-test-resources report-open
help: ## Show targets
@awk 'BEGIN {FS = ":.*## "}; /^[a-zA-Z0-9_-]+:.*## / {printf "%-26s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
up: ## Start simulator + gateway + seed
$(COMPOSE_CMD) up -d --build postgres
$(COMPOSE_CMD) up --build migrate
$(COMPOSE_CMD) up -d --build simulator api-gateway
$(COMPOSE_CMD) up --build seed
down: ## Stop lab stack
$(COMPOSE_CMD) --profile test down -v
build: ## Build pulumi-runner image (pulumi + pulumi-vsphere)
$(COMPOSE_CMD) $(PROFILE) build pulumi-runner
seed: ## Re-run inventory seed
$(COMPOSE_CMD) up --build seed
test-pulumi-smoke: up ## PU-INV + REST major-9 smoke (no VM/tags/CRUD/full SOAP)
$(COMPOSE_CMD) $(PROFILE) run --rm -e TEST_SMOKE=1 pulumi-runner \
python3 /suite/run_suite.py
test-pulumi: up ## Full hybrid: pulumi-vsphere + REST×6-9 + CRUD + SOAP WSDL
$(COMPOSE_CMD) $(PROFILE) run --rm pulumi-runner \
python3 /suite/run_suite.py
pulumi-tests: test-pulumi ## Alias used from repo root
test-smoke-all: test-pulumi-smoke ## Alias
test-all: test-pulumi ## Alias
clean-test-resources: ## Best-effort cleanup via seed reload
$(COMPOSE_CMD) up --build seed
report-open: ## Print how to copy the HTML report
@echo "HTML report volume: lab-reports → /reports/pulumi-report.html"
@echo "Copy: docker compose --profile test run --rm --no-deps -v \$$(pwd)/reports:/out pulumi-runner cp /reports/pulumi-report.html /out/"