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,21 @@
|
||||
**Language / Язык:** [English](../../examples/go.md) | [Русский](go.md)
|
||||
|
||||
# Go
|
||||
|
||||
Использует стандартную библиотеку Go (`net/http`) против
|
||||
`https://localhost` с Basic-auth сессией
|
||||
(`vmware-api-session-id`).
|
||||
|
||||
```bash
|
||||
cd examples/go
|
||||
go run .
|
||||
```
|
||||
|
||||
Переопределите значения по умолчанию через `VSPHERE_BASE`, `VSPHERE_USER`,
|
||||
`VSPHERE_PASSWORD`, `VSPHERE_VM_NAME`. См. [`main.go`](../../../examples/go/main.go)
|
||||
для потока session → list → create → power → wait-task → delete и вспомогательной
|
||||
функции `waitTask`, которая опрашивает `GET /api/cis/tasks/{task}`.
|
||||
|
||||
Проверка TLS отключена в HTTP-клиенте только для локального самоподписанного
|
||||
сертификата разработческого шлюза — не переиспользуйте такой transport против
|
||||
реального vCenter.
|
||||
Reference in New Issue
Block a user