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
+34
View File
@@ -0,0 +1,34 @@
"""OpenStack UI catalog payload tests."""
from app.openstack.request_bodies import clear_request_body_cache
from app.web.openstack_catalog import openstack_method_payload
def test_collection_create_body_uses_request_schema() -> None:
clear_request_body_cache()
payload = openstack_method_payload(
major=9,
path="/v1/status",
verb="POST",
runtime_version="openstack-dalmatian",
)
assert payload["service"] == "adjutant"
assert payload["body_fields"]
assert payload["body_example"]
# Must not be the old stub-only envelope.
assert payload["body_example"] != {"statu": {"name": "example"}}
assert "status" in payload["body_example"]
def test_action_body_example_uses_action_name() -> None:
clear_request_body_cache()
payload = openstack_method_payload(
major=9,
path="/v2.1/servers/{id}/action",
verb="POST",
runtime_version="openstack-dalmatian",
)
assert payload["body_fields"]
assert payload["body_example"]
# Wildcard server actions default to os-start in the schema catalog.
assert "os-start" in payload["body_example"]