f8d3cbdd59
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.
23 lines
795 B
Markdown
23 lines
795 B
Markdown
**Language / Язык:** [English](java.md) | [Русский](../ru/examples/java.md)
|
|
|
|
# Java
|
|
|
|
Java 11+ `HttpClient` cookbook using a Basic-auth session
|
|
(`vmware-api-session-id`) against `https://localhost`. No third-party
|
|
JSON library — responses are inspected with a small string-based field
|
|
extractor suitable for a lab smoke.
|
|
|
|
```bash
|
|
cd examples/java
|
|
javac Cookbook.java && java Cookbook
|
|
```
|
|
|
|
Override defaults with `VSPHERE_BASE`, `VSPHERE_USER`, `VSPHERE_PASSWORD`,
|
|
`VSPHERE_VM_NAME` environment variables. See
|
|
[`Cookbook.java`](../../examples/java/Cookbook.java) for the session →
|
|
create → power → wait-task → delete flow.
|
|
|
|
The client installs a trust-all `SSLContext` for the local self-signed
|
|
development gateway certificate only — do not reuse it against a real
|
|
vCenter.
|