mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-24 11:52:23 +03:00
fix(typing): resolve mypy errors in schemas.compute.vmware_nodes
This commit is contained in:
parent
b9192438c9
commit
898205a33b
@ -62,9 +62,9 @@ class VMwareBase(BaseModel):
|
|||||||
Common VMware node properties.
|
Common VMware node properties.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name: str
|
name: Optional[str] = None
|
||||||
vmx_path: str = Field(..., description="Path to the vmx file")
|
vmx_path: Optional[str] = None
|
||||||
linked_clone: bool = Field(..., description="Whether the VM is a linked clone or not")
|
linked_clone: Optional[bool] = None
|
||||||
node_id: Optional[UUID] = None
|
node_id: Optional[UUID] = None
|
||||||
usage: Optional[str] = Field(None, description="How to use the node")
|
usage: Optional[str] = Field(None, description="How to use the node")
|
||||||
console: Optional[int] = Field(None, gt=0, le=65535, description="Console TCP port")
|
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.
|
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):
|
class VMwareUpdate(VMwareBase):
|
||||||
@ -91,12 +93,13 @@ class VMwareUpdate(VMwareBase):
|
|||||||
Properties to update a VMware node.
|
Properties to update a VMware node.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name: Optional[str] = None
|
pass
|
||||||
vmx_path: Optional[str] = None
|
|
||||||
linked_clone: Optional[bool] = None
|
|
||||||
|
|
||||||
|
|
||||||
class VMware(VMwareBase):
|
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")
|
project_id: UUID = Field(..., description="Project ID")
|
||||||
node_directory: Optional[str] = Field(None, description="Path to the node working directory (read only)")
|
node_directory: Optional[str] = Field(None, description="Path to the node working directory (read only)")
|
||||||
status: NodeStatus = Field(..., description="Container status (read only)")
|
status: NodeStatus = Field(..., description="Container status (read only)")
|
||||||
|
|||||||
@ -383,7 +383,6 @@ module = [
|
|||||||
"gns3server.schemas.compute.nat_nodes", # 1
|
"gns3server.schemas.compute.nat_nodes", # 1
|
||||||
"gns3server.schemas.compute.qemu_nodes", # 1
|
"gns3server.schemas.compute.qemu_nodes", # 1
|
||||||
"gns3server.schemas.compute.virtualbox_nodes", # 2
|
"gns3server.schemas.compute.virtualbox_nodes", # 2
|
||||||
"gns3server.schemas.compute.vmware_nodes", # 3
|
|
||||||
"gns3server.schemas.compute.vpcs_nodes", # 1
|
"gns3server.schemas.compute.vpcs_nodes", # 1
|
||||||
"gns3server.schemas.controller.appliances", # 1
|
"gns3server.schemas.controller.appliances", # 1
|
||||||
"gns3server.schemas.controller.computes", # 6
|
"gns3server.schemas.controller.computes", # 6
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user