update storage
This commit is contained in:
parent
55bef3ed30
commit
70a934f55c
|
@ -1,6 +1,6 @@
|
|||
from typing import List, Optional
|
||||
import uuid
|
||||
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||
from pydantic import UUID1, UUID4, BaseModel, ConfigDict, Field
|
||||
|
||||
class Cluster(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
@ -8,5 +8,5 @@ class Cluster(BaseModel):
|
|||
id: UUID4
|
||||
name: str
|
||||
compute_id: UUID4
|
||||
storage_id: UUID4
|
||||
storage_id: UUID1
|
||||
network_switch_id: UUID4
|
|
@ -26,4 +26,4 @@ class DatacenterCreate(BaseModel):
|
|||
id:Optional[UUID4] = Field(default_factory=lambda:uuid.uuid4())
|
||||
name:str
|
||||
cluster_id:UUID4
|
||||
storage_pool_id:Optional[UUID4]
|
||||
storage_pool_id:Optional[UUID4] = Field(default=None)
|
|
@ -1,5 +1,6 @@
|
|||
from typing import List, Optional
|
||||
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||
from uuid import UUID
|
||||
from pydantic import UUID1, UUID4, BaseModel, ConfigDict, Field
|
||||
from pydantic_xml import attr
|
||||
|
||||
from ..libvirt.dom import config as configDom
|
||||
|
@ -28,7 +29,7 @@ class StoragePool(BaseModel):
|
|||
class Storage(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id:UUID4 = Field()
|
||||
id:UUID1 = Field()
|
||||
name:str = Field()
|
||||
pool: Optional[List[StoragePool]] = Field(default=[], alias='storage_pool')
|
||||
|
||||
|
|
Loading…
Reference in New Issue