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

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

View File

@ -62,9 +62,9 @@ class VMwareBase(BaseModel):
Common VMware node properties.
"""
name: str
vmx_path: str = Field(..., description="Path to the vmx file")
linked_clone: bool = Field(..., description="Whether the VM is a linked clone or not")
name: Optional[str] = None
vmx_path: Optional[str] = None
linked_clone: Optional[bool] = None
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")
@ -83,7 +83,9 @@ class VMwareCreate(VMwareBase):
Properties to create a VMware node.
"""
pass
name: str
vmx_path: str = Field(..., description="Path to the vmx file")
linked_clone: bool = Field(..., description="Whether the VM is a linked clone or not")
class VMwareUpdate(VMwareBase):
@ -91,12 +93,13 @@ class VMwareUpdate(VMwareBase):
Properties to update a VMware node.
"""
name: Optional[str] = None
vmx_path: Optional[str] = None
linked_clone: Optional[bool] = None
pass
class VMware(VMwareBase):
name: str
vmx_path: str = Field(..., description="Path to the vmx file")
linked_clone: bool = Field(..., description="Whether the VM is a linked clone or not")
project_id: UUID = Field(..., description="Project ID")
node_directory: Optional[str] = Field(None, description="Path to the node working directory (read only)")
status: NodeStatus = Field(..., description="Container status (read only)")

View File

@ -383,7 +383,6 @@ module = [
"gns3server.schemas.compute.nat_nodes", # 1
"gns3server.schemas.compute.qemu_nodes", # 1
"gns3server.schemas.compute.virtualbox_nodes", # 2
"gns3server.schemas.compute.vmware_nodes", # 3
"gns3server.schemas.compute.vpcs_nodes", # 1
"gns3server.schemas.controller.appliances", # 1
"gns3server.schemas.controller.computes", # 6