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
+35
View File
@@ -0,0 +1,35 @@
**Language / Язык:** [English](networking.md) | [Русский](../ru/domains/networking.md)
# Networking
Standard networks, distributed portgroups/switches, and host networking:
[`app/vsphere/rest/router.py`](../../app/vsphere/rest/router.py),
[`platform_rest.py`](../../app/vsphere/rest/platform_rest.py).
## Endpoints
| Method | Path | Notes |
|---|---|---|
| GET | `/api/vcenter/network` | Standard `Network` objects + `DistributedVirtualPortgroup` |
| GET/POST | `/api/vcenter/network/dvs` | Distributed virtual switches |
| POST | `/api/vcenter/network/dvpg` | Create a distributed portgroup |
| GET | `/api/vcenter/host/{host}/networking` | DNS, default gateway, `vmk0` interface, routing |
| GET/PUT/POST | `/api/appliance/networking` \| `/networking/dns/{hostname,servers,domains}` | vCenter appliance-level networking (see [Appliance](appliance.md)) |
Legacy `GET /rest/vcenter/network` mirrors the list.
## Highlights
- Every VM's `nics[].value.backing` points at either a `STANDARD_PORTGROUP`
(`network-41`, "VM Network") or a `DISTRIBUTED_PORTGROUP`
(`dvportgroup-4N`, tagged with a `vlan_id`).
- The default topology seeds one `VmwareDistributedVirtualSwitch`
(`dvs-51`, `mtu: 9000`) and 13 extra distributed portgroups depending on
profile size.
- Host networking (`GET /api/vcenter/host/{host}/networking`) returns DNS
servers/domains, a default gateway, and a single `vmk0` management
interface with a deterministic IPv4 address per host index.
- NSX-labelled Automation API paths (tier-0 gateway, projects, edges,
VPC/subnets) are seeded lab stand-ins under `namespace-management` — see
the "Platform surfaces" table in [API coverage](../api-coverage.md); they
are not a real NSX Manager.