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,22 @@
|
||||
**Language / Язык:** [English](../../examples/java.md) | [Русский](java.md)
|
||||
|
||||
# Java
|
||||
|
||||
Cookbook на Java 11+ `HttpClient` с Basic-auth сессией
|
||||
(`vmware-api-session-id`) против `https://localhost`. Без сторонних
|
||||
JSON-библиотек — ответы разбираются простым строковым извлечением полей,
|
||||
достаточным для лабораторного smoke.
|
||||
|
||||
```bash
|
||||
cd examples/java
|
||||
javac Cookbook.java && java Cookbook
|
||||
```
|
||||
|
||||
Переопределите значения по умолчанию переменными окружения `VSPHERE_BASE`,
|
||||
`VSPHERE_USER`, `VSPHERE_PASSWORD`, `VSPHERE_VM_NAME`. См.
|
||||
[`Cookbook.java`](../../../examples/java/Cookbook.java) для потока session →
|
||||
create → power → wait-task → delete.
|
||||
|
||||
Клиент устанавливает trust-all `SSLContext` только для локального
|
||||
самоподписанного сертификата разработческого шлюза — не переиспользуйте его
|
||||
против реального vCenter.
|
||||
Reference in New Issue
Block a user