rendu optional cdron sur schema pydantic

This commit is contained in:
Jonathan Gohier 2024-10-10 15:02:50 +02:00
parent b491e69fde
commit 6c935061a9
1 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class DevicesInterface(BaseModel):
switch_id:UUID4 switch_id:UUID4
id:UUID4 = Field(default_factory=uuid4) id:UUID4 = Field(default_factory=uuid4)
mac_addr:str = Field(default=None) mac_addr:str = Field(default='')
class Graphics(BaseModel): class Graphics(BaseModel):
port:int = Field(default=-1) port:int = Field(default=-1)
@ -121,7 +121,7 @@ class TPM(BaseModel):
class Devices(BaseModel): class Devices(BaseModel):
disks:Optional[List[DevicesDisk]] = Field(default=None, description="Disques virtuel") disks:Optional[List[DevicesDisk]] = Field(default=None, description="Disques virtuel")
cdrom:DevicesCDROM = Field(default=None, description="CDROM virtuel") cdrom:Optional[DevicesCDROM] = Field(default=None, description="CDROM virtuel")
interfaces:Optional[List[DevicesInterface]] = Field(default=None, description="Interfaces réseau") interfaces:Optional[List[DevicesInterface]] = Field(default=None, description="Interfaces réseau")
graphics:Optional[Graphics] = Field(default=None, description="Console VNC") graphics:Optional[Graphics] = Field(default=None, description="Console VNC")
audio:Audio = Field(default=None, description="Carte Audio") audio:Audio = Field(default=None, description="Carte Audio")