Build Proxmox visualizer app

This commit is contained in:
2026-06-07 09:30:11 +02:00
commit fa08851041
33 changed files with 2402 additions and 0 deletions
@@ -0,0 +1,19 @@
from fastapi import APIRouter
from app.core.config import settings
from app.models.schemas import ServerInfo
from app.services.scanner import parse_server_configs
router = APIRouter(prefix="/proxmox", tags=["proxmox"])
@router.get("/servers", response_model=list[ServerInfo])
async def list_servers() -> list[ServerInfo]:
servers, _ = parse_server_configs(settings.parsed_servers)
return [
ServerInfo(
name=server.name,
url=str(server.url).rstrip("/"),
)
for server in servers
]
@@ -0,0 +1,12 @@
from fastapi import APIRouter
from app.core.config import settings
from app.models.schemas import ScanResponse
from app.services.scanner import scan_servers
router = APIRouter(prefix="/vms", tags=["vms"])
@router.get("/scan", response_model=ScanResponse)
async def scan_vms() -> ScanResponse:
return await scan_servers(settings.parsed_servers)