Files
foodlinkk-command-center/tools-api/app/ops_routes.py
T
Aissa 5d60d33db1 Platform bundle: marketing publish, IT ops, packaging, agents mesh.
Volledige Foodlinkk Command Center uitbreiding met social automatisering,
reclamefolder filters, Proxmox monitoring en documentatie.
2026-06-09 00:41:27 +00:00

32 lines
914 B
Python

from __future__ import annotations
from fastapi import APIRouter, HTTPException
from app.connectors.proxmox import get_status_summary, get_topology, poll_and_snapshot
router = APIRouter(prefix="/ops", tags=["ops"])
@router.get("/status")
def ops_status() -> dict:
try:
return get_status_summary()
except Exception as exc: # noqa: BLE001
raise HTTPException(status_code=500, detail=f"ops status failed: {exc}") from exc
@router.get("/topology")
def ops_topology() -> dict:
try:
return get_topology()
except Exception as exc: # noqa: BLE001
raise HTTPException(status_code=500, detail=f"ops topology failed: {exc}") from exc
@router.post("/refresh")
def ops_refresh() -> dict:
try:
return poll_and_snapshot()
except Exception as exc: # noqa: BLE001
raise HTTPException(status_code=500, detail=f"ops refresh failed: {exc}") from exc