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:
@@ -0,0 +1,49 @@
|
||||
**Language / Язык:** [English](README.md) | [Русский](README.ru.md)
|
||||
|
||||
# Runnable client cookbooks
|
||||
|
||||
Companion code for [docs/clients.md](../docs/clients.md) and
|
||||
[docs/examples/](../docs/examples/overview.md).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
```bash
|
||||
make up
|
||||
VSPHERE_PROFILE=demo-cluster make seed # or small / large
|
||||
```
|
||||
|
||||
Default lab credentials: `administrator@vsphere.local` / `VMware1!`.
|
||||
|
||||
## Native vSphere smokes
|
||||
|
||||
```bash
|
||||
python examples/python/vsphere_rest_smoke.py https://localhost
|
||||
python examples/python/vsphere_soap_smoke.py https://localhost
|
||||
python examples/python/vsphere_lifecycle.py # REST create/power/guest FS + SOAP CreateVM
|
||||
python examples/python/requests_cookbook.py # raw requests, no SDK
|
||||
ansible-playbook -i examples/ansible/inventory.ini examples/ansible/vsphere_playbook.yml
|
||||
cd examples/terraform/vsphere && terraform init && terraform apply
|
||||
cd examples/pulumi && pulumi up
|
||||
cd examples/go && go run .
|
||||
cd examples/java && javac Cookbook.java && java Cookbook
|
||||
cd examples/perl && cpanm --installdeps . && perl cookbook.pl
|
||||
make vsphere-surface
|
||||
```
|
||||
|
||||
## Layout
|
||||
|
||||
| Path | Stack |
|
||||
|---|---|
|
||||
| `python/vsphere_*.py` | Native REST + SOAP smokes / lifecycle |
|
||||
| `python/requests_cookbook.py` | Raw `requests` REST cookbook (session, create/power/delete) |
|
||||
| `ansible/vsphere_playbook.yml` | Ansible REST lifecycle |
|
||||
| `terraform/vsphere/` | Terraform `hashicorp/vsphere` (SOAP-backed provider) |
|
||||
| `pulumi/` | Pulumi REST `ComponentResource` |
|
||||
| `go/`, `java/`, `perl/` | Minimal REST cookbooks in other languages (stdlib HTTP clients, Basic-auth session) |
|
||||
|
||||
An independent `pulumi-vsphere` lab suite lives under
|
||||
[`pulumi-tests/`](../pulumi-tests/README.md) — run `make pulumi-tests` from the
|
||||
repo root (or `make test-pulumi` inside that directory).
|
||||
|
||||
Guides: [docs/examples/](../docs/examples/overview.md). Coverage matrix:
|
||||
[docs/api-coverage.md](../docs/api-coverage.md).
|
||||
Reference in New Issue
Block a user