mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-25 23:24:34 +02:00
fix(typing): resolve mypy errors in schemas.compute.vmware_nodes
This commit is contained in:
2 files changed
+10
-8
No files matched your search
@@ -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)")
|
||||
Reference in new issue
Block a user