fix(typing): resolve mypy errors in schemas.compute.iou_nodes

This commit is contained in:
Mark Paronyan 2026-09-28 05:08:23 +00:00
parent abb564a2fa
commit aa7941411f
No known key found for this signature in database
GPG Key ID: 8DC7338A87FE22F8
2 changed files with 10 additions and 8 deletions

View File

@ -26,9 +26,9 @@ class IOUBase(BaseModel):
Common IOU node properties.
"""
name: str
path: str = Field(..., description="IOU executable path")
application_id: int = Field(..., description="Application ID for running IOU executable")
name: Optional[str] = None
path: Optional[str] = Field(None, description="IOU executable path")
application_id: Optional[int] = Field(None, description="Application ID for running IOU executable")
node_id: Optional[UUID] = None
usage: Optional[str] = Field(None, description="How to use the node")
console: Optional[int] = Field(None, gt=0, le=65535, description="Console TCP port")
@ -52,7 +52,9 @@ class IOUCreate(IOUBase):
Properties to create an IOU node.
"""
pass
name: str
path: str = Field(..., description="IOU executable path")
application_id: int = Field(..., description="Application ID for running IOU executable")
class IOUUpdate(IOUBase):
@ -60,12 +62,13 @@ class IOUUpdate(IOUBase):
Properties to update an IOU node.
"""
name: Optional[str] = None
path: Optional[str] = Field(None, description="IOU executable path")
application_id: Optional[int] = Field(None, description="Application ID for running IOU executable")
pass
class IOU(IOUBase):
name: str
path: str = Field(..., description="IOU executable path")
application_id: int = Field(..., description="Application ID for running IOU executable")
project_id: UUID = Field(..., description="Project ID")
node_directory: str = Field(..., description="Path to the node working directory (read only)")
command_line: str = Field(..., description="Last command line used to start IOU (read only)")

View File

@ -376,7 +376,6 @@ module = [
"gns3server.db.tasks", # 12
"gns3server.schemas.compute.atm_switch_nodes", # 5
"gns3server.schemas.compute.dynamips_nodes", # 1
"gns3server.schemas.compute.iou_nodes", # 3
"gns3server.schemas.compute.nat_nodes", # 1
"gns3server.schemas.compute.qemu_nodes", # 1
"gns3server.schemas.compute.virtualbox_nodes", # 2