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.vmware_templates
This commit is contained in:
parent
edaf9a4377
commit
79862d900a
@ -27,11 +27,11 @@ from pydantic import Field
|
||||
from typing import Optional, List
|
||||
|
||||
|
||||
class VMwareTemplate(TemplateBase):
|
||||
class VMwareTemplateBase(TemplateBase):
|
||||
category: Optional[Category] = Category.guest
|
||||
default_name_format: Optional[str] = "{name}-{0}"
|
||||
symbol: Optional[str] = "vmware_guest"
|
||||
vmx_path: str = Field(..., description="Path to the vmx file")
|
||||
vmx_path: Optional[str] = Field(None, description="Path to the vmx file")
|
||||
linked_clone: Optional[bool] = Field(False, description="Whether the VM is a linked clone or not")
|
||||
first_port_name: Optional[str] = Field("", description="Optional name of the first networking port example: eth0")
|
||||
port_name_format: Optional[str] = Field(
|
||||
@ -57,5 +57,9 @@ class VMwareTemplate(TemplateBase):
|
||||
custom_adapters: Optional[List[CustomAdapter]] = Field(default_factory=list, description="Custom adapters")
|
||||
|
||||
|
||||
class VMwareTemplateUpdate(VMwareTemplate):
|
||||
vmx_path: Optional[str] = Field(None, description="Path to the vmx file")
|
||||
class VMwareTemplate(VMwareTemplateBase):
|
||||
vmx_path: str = Field(..., description="Path to the vmx file")
|
||||
|
||||
|
||||
class VMwareTemplateUpdate(VMwareTemplateBase):
|
||||
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.vmware_templates", # 1
|
||||
"gns3server.schemas.qemu_disk_image", # 2
|
||||
"gns3server.services.computes", # 4
|
||||
"gns3server.services.templates", # 18
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user