This commit is contained in:
Mickael BOURNEUF 2024-11-28 10:56:15 +01:00
parent 70a934f55c
commit 9f32505843
3 changed files with 12 additions and 6 deletions

View File

@ -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]

View File

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

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name='deevirt_schema',
version='0.1.30',
version='0.1.31',
description='Deevirt Schema',
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
author='Celeonet',