13 lines
359 B
Python
13 lines
359 B
Python
from fastapi import APIRouter
|
|
|
|
from app.core.config import get_parsed_servers
|
|
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(get_parsed_servers())
|