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

This commit is contained in:
2026-07-18 08:47:38 +03:00
parent cbd0adca91
commit ae297258b1
46 changed files with 42717 additions and 40135 deletions
+14 -6
View File
@@ -1,4 +1,4 @@
"""CLI: python -m app.ovirt.seed_cli [--profile minimal|demo]."""
"""CLI: python -m app.ovirt.seed_cli [--profile minimal|small|large|big|demo]."""
from __future__ import annotations
@@ -9,7 +9,7 @@ import os
import asyncpg
from app.ovirt.demo_datacenter import seed_ovirt_demo
from app.ovirt.demo_datacenter import DEMO_PROFILES, normalize_cluster_size, seed_ovirt_demo
from app.ovirt.seed import seed_ovirt
@@ -20,10 +20,14 @@ async def _run(profile: str) -> dict:
)
conn = await asyncpg.connect(dsn)
try:
if profile == "demo":
result = await seed_ovirt_demo(conn)
else:
if profile == "minimal":
result = await seed_ovirt(conn)
elif profile in DEMO_PROFILES or profile in {"small", "large", "big"}:
result = await seed_ovirt_demo(conn, size=normalize_cluster_size(profile))
else:
raise SystemExit(
f"unknown profile {profile!r}; expected minimal|small|large|big|demo"
)
return result
finally:
await conn.close()
@@ -31,7 +35,11 @@ async def _run(profile: str) -> dict:
def main() -> None:
parser = argparse.ArgumentParser(description="Seed oVirt Engine simulator")
parser.add_argument("--profile", default=os.environ.get("SEED_PROFILE", "minimal"))
parser.add_argument(
"--profile",
default=os.environ.get("SEED_PROFILE", "minimal"),
help="minimal | small | large | big | demo (demo→large)",
)
args = parser.parse_args()
result = asyncio.run(_run(args.profile))
print(json.dumps(result, indent=2))