Add OpenStack request-body schemas and nested console PARAM sync.

This commit is contained in:
2026-07-18 08:47:16 +03:00
parent 6033967e6a
commit 2a8ce3a287
101 changed files with 150428 additions and 612 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ curl -X POST http://127.0.0.1:5000/ui/api/openstack/contracts/activate \
-d '{"series":"dalmatian"}'
```
Or Web UI → Environment → OpenStack API pack → Activate.
Or Web UI → API catalog → select series → **Apply as runtime**.
Hot-swap remounts schema routes (`remount_schema_services`) without rebuilding
the image.
+1 -1
View File
@@ -19,7 +19,7 @@ Generated from `contracts/openstack/dalmatian/manifest.json`.
| Yoga | 6 | 1060 |
Older series omit paths introduced later (`tools/os_api_inventory/series_deltas.py`)
and use lower microversion ceilings. Apply a pack in the Environment drawer to hot-swap.
and use lower microversion ceilings. Apply a pack in the API catalog drawer to hot-swap.
Surface-complete means every operation in the pack is mounted by the schema engine
(specialized routers still win on overlapping stateful paths).
+1 -4
View File
@@ -53,7 +53,4 @@ Specialized routers (Keystone, Nova, Neutron, …) remain stateful for happy-pat
## Web UI overrides
Environment drawer → **OpenStack API pack**:
- Activate series (hot remount)
- Per-service microversion override
API catalog drawer: select series card → microversion on the card → **Apply as runtime**.
+1 -1
View File
@@ -23,4 +23,4 @@ make seed-demo
## Microversion rejected
Lower the requested compute microversion or clear Web UI overrides.
Lower the requested compute microversion or apply an earlier series in the API catalog.
+6 -2
View File
@@ -95,8 +95,12 @@ curl -sH "X-Auth-Token: $TOKEN" http://127.0.0.1:9696/v2.0/networks
## 6. Open the Web UI
[http://localhost:5000/](http://localhost:5000/) — console, Environment drawer
(OpenStack pack series + microversions), Data drawer (load/unload demo cloud).
[http://localhost:5000/](http://localhost:5000/) — console, API catalog
(OpenStack pack series), Data drawer (load/unload demo cloud).
![Web console](images/web-ui/console-main.png)
Walkthrough of drawers and request parameters: [Web UI](web-ui.md).
## 7. Smoke / conformance
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

+15
View File
@@ -69,6 +69,21 @@ PYTHONPATH=tools python3 tools/os_api_inventory/generate_packs.py
PYTHONPATH=tools python3 tools/os_api_inventory/coverage_report.py
```
## Request body schemas (console)
Write methods (`POST`/`PUT`/`PATCH`) expose full JSON Schema field lists in the
web console. Schemas live in `contracts/openstack/request_bodies/<service>.json`
and are merged onto pack operations at load time (shared across series).
```bash
make request-bodies-generate # rebuild from in-repo api-ref catalog
make request-bodies-import # overlay Tier-1 services from openstack-openapi
make request-bodies-coverage # assert every write op has a schema
```
Tier-1 OpenAPI import covers nova, neutron, keystone, glance, cinder, octavia,
swift, and placement. Other services use the curated catalog generator.
## Backing up lab state
PostgreSQL is the system of record. Use `pg_dump` / volume snapshots.
+1 -1
View File
@@ -33,7 +33,7 @@ curl -X POST http://127.0.0.1:5000/ui/api/openstack/contracts/activate \
-d '{"series":"dalmatian"}'
```
Или Web UI → Environment → OpenStack API pack → Activate.
Или Web UI → API catalog → выбрать серию → **Apply as runtime**.
Hot-swap перемонтирует schema-маршруты (`remount_schema_services`) без пересборки
образа.
+1 -1
View File
@@ -19,7 +19,7 @@
| Yoga | 6 | 1060 |
Более старые серии опускают пути, добавленные позже (`tools/os_api_inventory/series_deltas.py`),
и используют более низкие потолки microversion. Примените пакет в Environment drawer для hot-swap.
и используют более низкие потолки microversion. Примените пакет в API catalog drawer для hot-swap.
Surface-complete означает, что каждая операция пакета смонтирована schema-движком
(специализированные роутеры по-прежнему выигрывают на пересекающихся stateful-путях).
+1 -4
View File
@@ -53,7 +53,4 @@
## Переопределения Web UI
Environment drawer → **OpenStack API pack**:
- Активация серии (hot remount)
- Переопределение microversion по сервисам
API catalog drawer: карточка серии → microversion в карточке → **Apply as runtime**.
+1 -1
View File
@@ -24,4 +24,4 @@ make seed-demo
## Microversion отклонён
Понизьте запрошенную compute microversion или сбросьте переопределения в Web UI.
Понизьте запрошенную compute microversion или примените более раннюю серию в API catalog.
+6 -2
View File
@@ -95,8 +95,12 @@ curl -sH "X-Auth-Token: $TOKEN" http://127.0.0.1:9696/v2.0/networks
## 6. Откройте Web UI
[http://localhost:5000/](http://localhost:5000/) — консоль, Environment drawer
(серия OpenStack pack + microversions), Data drawer (загрузка/выгрузка demo cloud).
[http://localhost:5000/](http://localhost:5000/) — консоль, API catalog
(серия OpenStack pack), Data drawer (загрузка/выгрузка demo cloud).
![Web-консоль](../images/web-ui/console-main.png)
Обзор drawers и параметров запроса: [Web UI](web-ui.md).
## 7. Smoke / conformance
+15
View File
@@ -69,6 +69,21 @@ PYTHONPATH=tools python3 tools/os_api_inventory/generate_packs.py
PYTHONPATH=tools python3 tools/os_api_inventory/coverage_report.py
```
## Схемы Request body (консоль)
Для `POST`/`PUT`/`PATCH` консоль показывает полные JSON Schema поля.
Схемы лежат в `contracts/openstack/request_bodies/<service>.json` и
подмешиваются к операциям пака при загрузке (общие для всех серий).
```bash
make request-bodies-generate # пересобрать из api-ref каталога
make request-bodies-import # наложить Tier-1 из openstack-openapi
make request-bodies-coverage # проверить, что у всех write-op есть схема
```
Tier-1: nova, neutron, keystone, glance, cinder, octavia, swift, placement.
Остальные сервисы — курируемый генератор каталога.
## Резервное копирование состояния лаборатории
PostgreSQL — источник истины. Используйте `pg_dump` / снимки volume.
+59 -4
View File
@@ -10,15 +10,70 @@
| `/docs` | OpenAPI (simulator) |
| `/ui/api/…` | UI JSON APIs |
![Главный экран консоли](../images/web-ui/console-main.png)
## Endpoints drawer
Обзор поверхности пака по сервисам (например Adjutant). У каждого path —
поддерживаемые HTTP-методы.
![Endpoints drawer](../images/web-ui/endpoints.png)
## Отправка запросов
Выберите verb + path и нажмите **Send**. Успешные ответы попадают в
**RESPONSE**.
![Запрос и ответ](../images/web-ui/request-response.png)
### Request parameters
Для `POST` / `PUT` / `PATCH` в **Request parameters** показаны поля схемы
(dotted-имена для вложенных OpenStack envelope), типы, optional и примеры.
JSON Request body собирается из этих полей.
![Request parameters](../images/web-ui/request-parameters.png)
## Authentication drawer
Вход через лабораторный Keystone (`admin` / `secret`, проекты вроде `admin`
или `demo`). Можно вставить готовый `X-Auth-Token`.
![Authentication drawer](../images/web-ui/authentication.png)
## Environment drawer
- **OpenStack API pack** — список серий, активация пакета, переопределения microversion
- Apply немедленно перемонтирует schema-маршруты
- Runtime / catalog / активная **microversion**, плюс живой инвентарь облака
(servers, nets, volumes…)
![Environment drawer](../images/web-ui/environment.png)
## API catalog drawer
- Выбор карточки серии (`os · yoga` …), microversion в карточке, затем
**Apply as runtime** (выбор сохраняется после перезагрузки)
![API catalog drawer](../images/web-ui/api-catalog.png)
## Data drawer
- **Load demo cloud** — `POST /ui/api/demo/load``seed_openstack_demo`
- **Unload / minimal** — сброс к minimal seed
- **Load demo cloud** — кластеры small / large / big
- **Reset to minimal** — минимальный lab seed
![Data drawer](../images/web-ui/data.png)
## History drawer
Недавние вызовы консоли: method, URL и status.
![History drawer](../images/web-ui/history.png)
## Help · Compatibility
Покрытие поверхности пака для активной серии (declared / implemented,
сервисы, смесь verb).
![Help compatibility](../images/web-ui/help-compatibility.png)
## Брендинг
+59 -4
View File
@@ -10,15 +10,70 @@ Console is served from the Keystone/UI port (**5000** on the gateway).
| `/docs` | OpenAPI (simulator) |
| `/ui/api/…` | UI JSON APIs |
![Console main view](images/web-ui/console-main.png)
## Endpoints drawer
Browse the pack surface by service (for example Adjutant). Each path shows the
supported verbs.
![Endpoints drawer](images/web-ui/endpoints.png)
## Sending requests
Pick a verb + path, then **Send**. Successful calls show status and JSON in
**RESPONSE**.
![Request and response](images/web-ui/request-response.png)
### Request parameters
For `POST` / `PUT` / `PATCH`, **Request parameters** lists schema fields
(dotted names for nested OpenStack envelopes) with types, optional flags, and
example values. The Request body JSON is built from those fields.
![Request parameters](images/web-ui/request-parameters.png)
## Authentication drawer
Sign in with lab Keystone users (`admin` / `secret`, projects such as `admin`
or `demo`). Optional paste of an existing `X-Auth-Token`.
![Authentication drawer](images/web-ui/authentication.png)
## Environment drawer
- **OpenStack API pack** — list series, activate pack, set microversion overrides
- Apply remounts schema routes immediately
- Runtime / catalog / active **microversion**, plus live cloud inventory
(servers, nets, volumes…)
![Environment drawer](images/web-ui/environment.png)
## API catalog drawer
- Select an OpenStack series card (`os · yoga` …), choose a **microversion** on
the card, then **Apply as runtime** (choice is remembered across reloads)
![API catalog drawer](images/web-ui/api-catalog.png)
## Data drawer
- **Load demo cloud** — `POST /ui/api/demo/load``seed_openstack_demo`
- **Unload / minimal** — reset to minimal seed
- **Load demo cloud** — sized clusters (small / large / big)
- **Reset to minimal** — minimal lab seed
![Data drawer](images/web-ui/data.png)
## History drawer
Recent console calls with method, URL, and status.
![History drawer](images/web-ui/history.png)
## Help · Compatibility
Pack surface coverage for the active series (declared / implemented ops,
services, verb mix).
![Help compatibility](images/web-ui/help-compatibility.png)
## Branding