Files
vmware-api-simulator/docs/ru/examples/java.md
T
inecs f8d3cbdd59 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.
2026-07-18 04:42:11 +03:00

23 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
**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.