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")