mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-30 07:40:12 +03:00
fix(typing): resolve mypy errors in schemas.controller.templates.iou_templates
This commit is contained in:
parent
b9192438c9
commit
94a0f462bf
@ -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
|
||||
|
||||
@ -391,7 +391,6 @@ module = [
|
||||
"gns3server.schemas.controller.projects", # 2
|
||||
"gns3server.schemas.controller.settings", # 3
|
||||
"gns3server.schemas.controller.templates.docker_templates", # 1
|
||||
"gns3server.schemas.controller.templates.iou_templates", # 1
|
||||
"gns3server.schemas.controller.templates.virtualbox_templates", # 1
|
||||
"gns3server.schemas.controller.templates.vmware_templates", # 1
|
||||
"gns3server.schemas.qemu_disk_image", # 2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user