mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Pydantic v2 migration
This commit is contained in:
1 parent
11f51b3809
commit
9c456532d0
46 files changed
+221
-277
No files matched your search
@@ -321,7 +321,7 @@ class ApplianceImage(BaseModel):
|
||||
|
||||
filename: str = Field(..., title='Filename')
|
||||
version: str = Field(..., title='Version of the file')
|
||||
md5sum: str = Field(..., title='md5sum of the file', regex='^[a-f0-9]{32}$')
|
||||
md5sum: str = Field(..., title='md5sum of the file', pattern='^[a-f0-9]{32}$')
|
||||
filesize: int = Field(..., title='File size in bytes')
|
||||
download_url: Optional[Union[AnyUrl, constr(max_length=0)]] = Field(
|
||||
None, title='Download url where you can download the appliance from a browser'
|
||||
@@ -351,7 +351,7 @@ class ApplianceVersionImages(BaseModel):
|
||||
class ApplianceVersion(BaseModel):
|
||||
|
||||
name: str = Field(..., title='Name of the version')
|
||||
idlepc: Optional[str] = Field(None, regex='^0x[0-9a-f]{8}')
|
||||
idlepc: Optional[str] = Field(None, pattern='^0x[0-9a-f]{8}')
|
||||
images: Optional[ApplianceVersionImages] = Field(None, title='Images used for this version')
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user