mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
fix(typing): resolve mypy errors in schemas.controller.templates.iou_templates
This commit is contained in:
2 files changed
+8
-5
No files matched your search
@@ -22,11 +22,11 @@ from pydantic import Field
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class IOUTemplate(TemplateBase):
|
||||
class IOUTemplateBase(TemplateBase):
|
||||
category: Optional[Category] = Category.router
|
||||
default_name_format: Optional[str] = "IOU{0}"
|
||||
symbol: Optional[str] = "multilayer_switch"
|
||||
path: str = Field(..., description="Path of IOU executable")
|
||||
path: Optional[str] = Field(None, description="Path of IOU executable")
|
||||
ethernet_adapters: Optional[int] = Field(2, ge=0, description="Number of ethernet adapters")
|
||||
serial_adapters: Optional[int] = Field(2, ge=0, description="Number of serial adapters")
|
||||
ram: Optional[int] = Field(1024, gt=0, description="Amount of RAM in MB")
|
||||
@@ -44,5 +44,9 @@ class IOUTemplate(TemplateBase):
|
||||
)
|
||||
|
||||
|
||||
class IOUTemplateUpdate(IOUTemplate):
|
||||
path: Optional[str] = Field(None, description="Path of IOU executable")
|
||||
class IOUTemplate(IOUTemplateBase):
|
||||
path: str = Field(..., description="Path of IOU executable")
|
||||
|
||||
|
||||
class IOUTemplateUpdate(IOUTemplateBase):
|
||||
pass
|
||||
Reference in new issue
Block a user