Added threaded create_vm endpoint

This commit is contained in:
Qubasa
2023-09-25 16:28:32 +02:00
committed by Mic92
parent 7479fca82b
commit d16bb5db26
8 changed files with 120 additions and 89 deletions

View File

@@ -1,3 +1,5 @@
# Logging setup
import logging
from typing import Annotated
from fastapi import APIRouter, Body
@@ -19,10 +21,7 @@ from ..schemas import (
Status,
)
# Logging setup
import logging
log = logging.getLogger(__name__)
router = APIRouter()
@@ -42,7 +41,7 @@ async def create_machine(machine: Annotated[MachineCreate, Body()]) -> MachineRe
@router.get("/api/machines/{name}")
async def get_machine(name: str) -> MachineResponse:
print("TODO")
log.error("TODO")
return MachineResponse(machine=Machine(name=name, status=Status.UNKNOWN))