From 1b5357f090c6224b3440c79d652170c06f4f7c2d Mon Sep 17 00:00:00 2001 From: Mickael B Date: Fri, 18 Oct 2024 10:47:54 +0200 Subject: [PATCH] Display child from Storage et StoragePool --- api/storage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/storage.py b/api/storage.py index e5e5031..2745ade 100644 --- a/api/storage.py +++ b/api/storage.py @@ -16,21 +16,21 @@ class StorageBlock(BaseModel): id:UUID4 = Field() name:str = Field() size:int = Field() - vm_hard_disk:List[VMHardDisk] = Field() + vm_hard_disk:Optional[List[VMHardDisk]] = Field(default=[]) class StoragePool(BaseModel): model_config = ConfigDict(from_attributes=True) id:UUID4 = Field() name:str = Field() - block:Optional[List[StorageBlock]] = Field(default=[], alias='block') + block:Optional[List[StorageBlock]] = Field(default=[], alias='storage_block_rbd') class Storage(BaseModel): model_config = ConfigDict(from_attributes=True) id:UUID4 = Field() name:str = Field() - pool: Optional[List[StoragePool]] = Field(default=[], alias='pool') + pool: Optional[List[StoragePool]] = Field(default=[], alias='storage_pool') class DiskDriver(configDom.DevicesDiskDriver): name:str = Field(default="qemu")