update
This commit is contained in:
parent
70a934f55c
commit
9f32505843
|
@ -13,7 +13,7 @@ class Datacenter(BaseModel):
|
|||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
company_id:UUID4
|
||||
id:UUID4
|
||||
id:Optional[UUID4] = Field(default_factory=uuid.uuid4)
|
||||
name:str
|
||||
cluster_id:UUID4
|
||||
storage_pool_id:Optional[UUID4]
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from ipaddress import IPv4Address, IPv6Address
|
||||
from typing import List, Optional
|
||||
from uuid import uuid4
|
||||
from pydantic_xml import element, attr
|
||||
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||
from pydantic_extra_types.mac_address import MacAddress
|
||||
|
@ -12,14 +13,19 @@ class lsp(BaseModel):
|
|||
ipv4_addr:Optional[IPv4Address] = Field(default=None)
|
||||
ipv6_addr:Optional[IPv6Address] = Field(default=None)
|
||||
|
||||
class lspCreate(BaseModel):
|
||||
switch_id:UUID4 = Field(default=None)
|
||||
id:Optional[UUID4]
|
||||
mac_addr:Optional[str] = Field()
|
||||
|
||||
class ls(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
datacenter_id:Optional[UUID4] = Field(default=None)
|
||||
id:UUID4 = Field()
|
||||
name:str = Field()
|
||||
network_switch_port:Optional[List[lsp]] = Field(default=[])
|
||||
|
||||
class lspCreate(BaseModel):
|
||||
switch_id:UUID4 = Field(default=None)
|
||||
id:Optional[UUID4]
|
||||
mac_addr:Optional[str] = Field()
|
||||
class lsCreate(ls):
|
||||
id:Optional[UUID4] = Field(default_factory=uuid4)
|
||||
|
||||
|
|
Loading…
Reference in New Issue