update
This commit is contained in:
parent
70a934f55c
commit
9f32505843
|
@ -13,7 +13,7 @@ class Datacenter(BaseModel):
|
||||||
model_config = ConfigDict(from_attributes=True)
|
model_config = ConfigDict(from_attributes=True)
|
||||||
|
|
||||||
company_id:UUID4
|
company_id:UUID4
|
||||||
id:UUID4
|
id:Optional[UUID4] = Field(default_factory=uuid.uuid4)
|
||||||
name:str
|
name:str
|
||||||
cluster_id:UUID4
|
cluster_id:UUID4
|
||||||
storage_pool_id:Optional[UUID4]
|
storage_pool_id:Optional[UUID4]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from ipaddress import IPv4Address, IPv6Address
|
from ipaddress import IPv4Address, IPv6Address
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
from uuid import uuid4
|
||||||
from pydantic_xml import element, attr
|
from pydantic_xml import element, attr
|
||||||
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||||
from pydantic_extra_types.mac_address import MacAddress
|
from pydantic_extra_types.mac_address import MacAddress
|
||||||
|
@ -12,14 +13,19 @@ class lsp(BaseModel):
|
||||||
ipv4_addr:Optional[IPv4Address] = Field(default=None)
|
ipv4_addr:Optional[IPv4Address] = Field(default=None)
|
||||||
ipv6_addr:Optional[IPv6Address] = 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):
|
class ls(BaseModel):
|
||||||
model_config = ConfigDict(from_attributes=True)
|
model_config = ConfigDict(from_attributes=True)
|
||||||
|
|
||||||
|
datacenter_id:Optional[UUID4] = Field(default=None)
|
||||||
id:UUID4 = Field()
|
id:UUID4 = Field()
|
||||||
name:str = Field()
|
name:str = Field()
|
||||||
network_switch_port:Optional[List[lsp]] = Field(default=[])
|
network_switch_port:Optional[List[lsp]] = Field(default=[])
|
||||||
|
|
||||||
class lspCreate(BaseModel):
|
class lsCreate(ls):
|
||||||
switch_id:UUID4 = Field(default=None)
|
id:Optional[UUID4] = Field(default_factory=uuid4)
|
||||||
id:Optional[UUID4]
|
|
||||||
mac_addr:Optional[str] = Field()
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='deevirt_schema',
|
name='deevirt_schema',
|
||||||
version='0.1.30',
|
version='0.1.31',
|
||||||
description='Deevirt Schema',
|
description='Deevirt Schema',
|
||||||
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
|
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
|
||||||
author='Celeonet',
|
author='Celeonet',
|
||||||
|
|
Loading…
Reference in New Issue