mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
feat: add response models for endpoints returning untyped objects
This commit is contained in:
24 files changed
+1192
-53
No files matched your search
@@ -55,3 +55,24 @@ class GNS3VM(BaseModel):
|
||||
vcpus: Optional[int] = Field(None, description="Number of CPUs to allocate for the GNS3 VM")
|
||||
ram: Optional[int] = Field(None, description="Amount of memory to allocate for the GNS3 VM")
|
||||
port: Optional[int] = Field(None, gt=0, le=65535)
|
||||
|
||||
|
||||
class GNS3VMEngineInfo(BaseModel):
|
||||
"""
|
||||
A virtualization engine supported by the GNS3 VM.
|
||||
"""
|
||||
|
||||
engine_id: str = Field(..., description="Engine identifier")
|
||||
name: str = Field(..., description="Engine display name")
|
||||
description: str = Field(..., description="Engine description (may contain HTML)")
|
||||
support_when_exit: bool = Field(..., description="The engine supports the 'when exit' action")
|
||||
support_headless: bool = Field(..., description="The engine supports headless mode")
|
||||
support_ram: bool = Field(..., description="The engine supports RAM and vCPUs allocation")
|
||||
|
||||
|
||||
class GNS3VMInfo(BaseModel):
|
||||
"""
|
||||
A virtual machine available on a virtualization engine.
|
||||
"""
|
||||
|
||||
vmname: str = Field(..., description="Virtual machine name")
|
||||
Reference in new issue
Block a user