Display child from Storage et StoragePool

This commit is contained in:
Mickael BOURNEUF 2024-10-18 10:47:54 +02:00
parent 778b18f393
commit 1b5357f090
1 changed files with 3 additions and 3 deletions

View File

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