mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-05 18:21:05 +03:00
style: sort imports in schemas
This commit is contained in:
parent
634189d443
commit
3b993b464f
@ -15,102 +15,107 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# General schemas
|
# General schemas
|
||||||
from .config import ServerConfig
|
|
||||||
from .common import ErrorMessage
|
from .common import ErrorMessage
|
||||||
from .version import Version
|
from .config import ServerConfig
|
||||||
|
from .controller.appliances import Appliance, ApplianceVersion, ApplianceVersionV8
|
||||||
# Controller schemas
|
|
||||||
from .controller.links import (
|
|
||||||
LinkCreate,
|
|
||||||
LinkUpdate,
|
|
||||||
Link,
|
|
||||||
UDPPortInfo,
|
|
||||||
EthernetPortInfo,
|
|
||||||
LinkCapture,
|
|
||||||
MarkerCreate,
|
|
||||||
MarkerUpdate,
|
|
||||||
MarkerDefinitionCreate,
|
|
||||||
)
|
|
||||||
from .controller.computes import (
|
from .controller.computes import (
|
||||||
|
AutoIdlePC,
|
||||||
|
Compute,
|
||||||
ComputeCreate,
|
ComputeCreate,
|
||||||
|
ComputeDockerImage,
|
||||||
ComputeUpdate,
|
ComputeUpdate,
|
||||||
ComputeVirtualBoxVM,
|
ComputeVirtualBoxVM,
|
||||||
ComputeVMwareVM,
|
ComputeVMwareVM,
|
||||||
ComputeDockerImage,
|
|
||||||
AutoIdlePC,
|
|
||||||
Compute,
|
|
||||||
)
|
)
|
||||||
from .controller.templates import TemplateCreate, TemplateUpdate, TemplateUsage, Template
|
|
||||||
from .controller.images import Image, ImageType, ImageSyncRequest, ImageSyncJob
|
|
||||||
from .controller.appliances import ApplianceVersion, ApplianceVersionV8, Appliance
|
|
||||||
from .controller.drawings import Drawing
|
from .controller.drawings import Drawing
|
||||||
from .controller.gns3vm import GNS3VM
|
from .controller.gns3vm import GNS3VM
|
||||||
from .controller.nodes import NodeCreate, NodeUpdate, NodeDuplicate, NodeCapture, Node
|
from .controller.images import Image, ImageSyncJob, ImageSyncRequest, ImageType
|
||||||
from .controller.projects import (
|
|
||||||
ProjectCreate,
|
# Controller schemas
|
||||||
ProjectUpdate,
|
from .controller.links import (
|
||||||
ProjectDuplicate,
|
EthernetPortInfo,
|
||||||
Project,
|
Link,
|
||||||
ProjectFile,
|
LinkCapture,
|
||||||
ProjectCompression,
|
LinkCreate,
|
||||||
NodeFile,
|
LinkUpdate,
|
||||||
|
MarkerCreate,
|
||||||
|
MarkerDefinitionCreate,
|
||||||
|
MarkerUpdate,
|
||||||
|
UDPPortInfo,
|
||||||
)
|
)
|
||||||
|
from .controller.nodes import Node, NodeCapture, NodeCreate, NodeDuplicate, NodeUpdate
|
||||||
|
from .controller.projects import (
|
||||||
|
NodeFile,
|
||||||
|
Project,
|
||||||
|
ProjectCompression,
|
||||||
|
ProjectCreate,
|
||||||
|
ProjectDuplicate,
|
||||||
|
ProjectFile,
|
||||||
|
ProjectUpdate,
|
||||||
|
)
|
||||||
|
from .controller.templates import Template, TemplateCreate, TemplateUpdate, TemplateUsage
|
||||||
from .controller.users import (
|
from .controller.users import (
|
||||||
UserCreate,
|
Credentials,
|
||||||
UserUpdate,
|
|
||||||
LoggedInUserUpdate,
|
LoggedInUserUpdate,
|
||||||
User,
|
User,
|
||||||
Credentials,
|
UserCreate,
|
||||||
|
UserGroup,
|
||||||
UserGroupCreate,
|
UserGroupCreate,
|
||||||
UserGroupUpdate,
|
UserGroupUpdate,
|
||||||
UserGroup,
|
UserUpdate,
|
||||||
)
|
)
|
||||||
|
from .version import Version
|
||||||
|
|
||||||
# Conditionally import AI-related schemas
|
# Conditionally import AI-related schemas
|
||||||
try:
|
try:
|
||||||
from .controller.llm_model_configs import (
|
|
||||||
LLMModelConfigData,
|
|
||||||
LLMModelConfigCreate,
|
|
||||||
LLMModelConfigUpdate,
|
|
||||||
LLMModelConfigResponse,
|
|
||||||
LLMModelConfigWithSource,
|
|
||||||
LLMModelConfigInheritedResponse,
|
|
||||||
LLMModelConfigListResponse,
|
|
||||||
)
|
|
||||||
from .controller.chat import (
|
from .controller.chat import (
|
||||||
OpenAIToolCall,
|
|
||||||
ChatRequest,
|
ChatRequest,
|
||||||
ChatResponse,
|
ChatResponse,
|
||||||
OpenAIMessage,
|
|
||||||
ConversationHistory,
|
|
||||||
ChatSession,
|
ChatSession,
|
||||||
|
ConversationHistory,
|
||||||
|
OpenAIMessage,
|
||||||
|
OpenAIToolCall,
|
||||||
RenameSession,
|
RenameSession,
|
||||||
)
|
)
|
||||||
|
from .controller.llm_model_configs import (
|
||||||
|
LLMModelConfigCreate,
|
||||||
|
LLMModelConfigData,
|
||||||
|
LLMModelConfigInheritedResponse,
|
||||||
|
LLMModelConfigListResponse,
|
||||||
|
LLMModelConfigResponse,
|
||||||
|
LLMModelConfigUpdate,
|
||||||
|
LLMModelConfigWithSource,
|
||||||
|
)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# AI schemas are not available (should not happen as they don't depend on external libs)
|
# AI schemas are not available (should not happen as they don't depend on external libs)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from .controller.rbac import RoleCreate, RoleUpdate, Role, Privilege, ACECreate, ACEUpdate, ACE
|
from .compute.atm_switch_nodes import ATMSwitch, ATMSwitchCreate, ATMSwitchUpdate
|
||||||
from .controller.settings import SettingsResponse, SettingsUpdate, SettingsUpdateResponse
|
from .compute.cloud_nodes import Cloud, CloudCreate, CloudUpdate
|
||||||
from .controller.pools import Resource, ResourceCreate, ResourcePoolCreate, ResourcePoolUpdate, ResourcePool
|
from .compute.docker_nodes import Docker, DockerCreate, DockerUpdate
|
||||||
from .controller.tokens import Token, ApiKeyCreate, RefreshTokenRequest
|
from .compute.dynamips_nodes import Dynamips, DynamipsCreate, DynamipsUpdate
|
||||||
from .controller.snapshots import SnapshotCreate, Snapshot
|
from .compute.ethernet_hub_nodes import EthernetHub, EthernetHubCreate, EthernetHubUpdate
|
||||||
from .controller.iou_license import IOULicense
|
from .compute.ethernet_switch_nodes import EthernetSwitch, EthernetSwitchCreate, EthernetSwitchUpdate
|
||||||
from .controller.capabilities import Capabilities
|
from .compute.frame_relay_switch_nodes import FrameRelaySwitch, FrameRelaySwitchCreate, FrameRelaySwitchUpdate
|
||||||
from .controller.netmiko import NetmikoDeviceType, NetmikoDeviceTypeList
|
from .compute.iou_nodes import IOU, IOUCreate, IOUStart, IOUUpdate
|
||||||
|
from .compute.nat_nodes import NAT, NATCreate, NATUpdate
|
||||||
|
|
||||||
# Controller template schemas
|
# Compute schemas
|
||||||
from .controller.templates.vpcs_templates import VPCSTemplate, VPCSTemplateUpdate
|
from .compute.nios import TAPNIO, UDPNIO, BatchNIOCreate, BatchNIOEntry, EthernetNIO, MarkerRebuild, MarkerToggle
|
||||||
|
from .compute.qemu_nodes import Qemu, QemuCreate, QemuUpdate
|
||||||
|
from .compute.virtualbox_nodes import VirtualBox, VirtualBoxCreate, VirtualBoxUpdate
|
||||||
|
from .compute.vmware_nodes import VMware, VMwareCreate, VMwareUpdate
|
||||||
|
from .compute.vpcs_nodes import VPCS, VPCSCreate, VPCSUpdate
|
||||||
|
from .controller.capabilities import Capabilities
|
||||||
|
from .controller.iou_license import IOULicense
|
||||||
|
from .controller.netmiko import NetmikoDeviceType, NetmikoDeviceTypeList
|
||||||
|
from .controller.pools import Resource, ResourceCreate, ResourcePool, ResourcePoolCreate, ResourcePoolUpdate
|
||||||
|
from .controller.rbac import ACE, ACECreate, ACEUpdate, Privilege, Role, RoleCreate, RoleUpdate
|
||||||
|
from .controller.settings import SettingsResponse, SettingsUpdate, SettingsUpdateResponse
|
||||||
|
from .controller.snapshots import Snapshot, SnapshotCreate
|
||||||
from .controller.templates.cloud_templates import CloudTemplate, CloudTemplateUpdate
|
from .controller.templates.cloud_templates import CloudTemplate, CloudTemplateUpdate
|
||||||
from .controller.templates.iou_templates import IOUTemplate, IOUTemplateUpdate
|
|
||||||
from .controller.templates.docker_templates import DockerTemplate, DockerTemplateUpdate
|
from .controller.templates.docker_templates import DockerTemplate, DockerTemplateUpdate
|
||||||
from .controller.templates.ethernet_hub_templates import EthernetHubTemplate, EthernetHubTemplateUpdate
|
|
||||||
from .controller.templates.ethernet_switch_templates import EthernetSwitchTemplate, EthernetSwitchTemplateUpdate
|
|
||||||
from .controller.templates.virtualbox_templates import VirtualBoxTemplate, VirtualBoxTemplateUpdate
|
|
||||||
from .controller.templates.vmware_templates import VMwareTemplate, VMwareTemplateUpdate
|
|
||||||
from .controller.templates.qemu_templates import QemuTemplate, QemuTemplateUpdate
|
|
||||||
from .controller.templates.dynamips_templates import (
|
from .controller.templates.dynamips_templates import (
|
||||||
DynamipsTemplate,
|
|
||||||
C1700DynamipsTemplate,
|
C1700DynamipsTemplate,
|
||||||
C1700DynamipsTemplateUpdate,
|
C1700DynamipsTemplateUpdate,
|
||||||
C2600DynamipsTemplate,
|
C2600DynamipsTemplate,
|
||||||
@ -125,23 +130,18 @@ from .controller.templates.dynamips_templates import (
|
|||||||
C3745DynamipsTemplateUpdate,
|
C3745DynamipsTemplateUpdate,
|
||||||
C7200DynamipsTemplate,
|
C7200DynamipsTemplate,
|
||||||
C7200DynamipsTemplateUpdate,
|
C7200DynamipsTemplateUpdate,
|
||||||
|
DynamipsTemplate,
|
||||||
)
|
)
|
||||||
|
from .controller.templates.ethernet_hub_templates import EthernetHubTemplate, EthernetHubTemplateUpdate
|
||||||
|
from .controller.templates.ethernet_switch_templates import EthernetSwitchTemplate, EthernetSwitchTemplateUpdate
|
||||||
|
from .controller.templates.iou_templates import IOUTemplate, IOUTemplateUpdate
|
||||||
|
from .controller.templates.qemu_templates import QemuTemplate, QemuTemplateUpdate
|
||||||
|
from .controller.templates.virtualbox_templates import VirtualBoxTemplate, VirtualBoxTemplateUpdate
|
||||||
|
from .controller.templates.vmware_templates import VMwareTemplate, VMwareTemplateUpdate
|
||||||
|
|
||||||
# Compute schemas
|
# Controller template schemas
|
||||||
from .compute.nios import UDPNIO, TAPNIO, EthernetNIO, MarkerToggle, MarkerRebuild, BatchNIOEntry, BatchNIOCreate
|
from .controller.templates.vpcs_templates import VPCSTemplate, VPCSTemplateUpdate
|
||||||
from .compute.atm_switch_nodes import ATMSwitchCreate, ATMSwitchUpdate, ATMSwitch
|
from .controller.tokens import ApiKeyCreate, RefreshTokenRequest, Token
|
||||||
from .compute.cloud_nodes import CloudCreate, CloudUpdate, Cloud
|
|
||||||
from .compute.docker_nodes import DockerCreate, DockerUpdate, Docker
|
|
||||||
from .compute.dynamips_nodes import DynamipsCreate, DynamipsUpdate, Dynamips
|
|
||||||
from .compute.ethernet_hub_nodes import EthernetHubCreate, EthernetHubUpdate, EthernetHub
|
|
||||||
from .compute.ethernet_switch_nodes import EthernetSwitchCreate, EthernetSwitchUpdate, EthernetSwitch
|
|
||||||
from .compute.frame_relay_switch_nodes import FrameRelaySwitchCreate, FrameRelaySwitchUpdate, FrameRelaySwitch
|
|
||||||
from .compute.qemu_nodes import QemuCreate, QemuUpdate, Qemu
|
|
||||||
from .compute.iou_nodes import IOUCreate, IOUUpdate, IOUStart, IOU
|
|
||||||
from .compute.nat_nodes import NATCreate, NATUpdate, NAT
|
|
||||||
from .compute.vpcs_nodes import VPCSCreate, VPCSUpdate, VPCS
|
|
||||||
from .compute.vmware_nodes import VMwareCreate, VMwareUpdate, VMware
|
|
||||||
from .compute.virtualbox_nodes import VirtualBoxCreate, VirtualBoxUpdate, VirtualBox
|
|
||||||
|
|
||||||
# Schemas for both controller and compute
|
# Schemas for both controller and compute
|
||||||
from .qemu_disk_image import QemuDiskImageFormat, QemuDiskImageCreate, QemuDiskImageUpdate
|
from .qemu_disk_image import QemuDiskImageCreate, QemuDiskImageFormat, QemuDiskImageUpdate
|
||||||
|
|||||||
@ -14,9 +14,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, field_validator
|
|
||||||
from typing import Optional
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field, field_validator
|
||||||
|
|
||||||
|
|
||||||
class ErrorMessage(BaseModel):
|
class ErrorMessage(BaseModel):
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, Union, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional, Union
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, field_validator
|
from typing import List, Optional
|
||||||
from typing import Optional, List
|
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from ..common import NodeStatus, CustomAdapter, ConsoleType, AuxType, ExtraConfig
|
from pydantic import BaseModel, Field, field_validator
|
||||||
|
|
||||||
|
from ..common import AuxType, ConsoleType, CustomAdapter, ExtraConfig, NodeStatus
|
||||||
|
|
||||||
|
|
||||||
class DockerBase(BaseModel):
|
class DockerBase(BaseModel):
|
||||||
|
|||||||
@ -15,11 +15,12 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from typing import List, Optional
|
||||||
from typing import Optional, List
|
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, model_validator
|
|
||||||
from typing import Optional, List
|
|
||||||
from uuid import UUID
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field, model_validator
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from ..common import NodeStatus, ConsoleType
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from ..common import ConsoleType, NodeStatus
|
||||||
|
|
||||||
|
|
||||||
class IOUBase(BaseModel):
|
class IOUBase(BaseModel):
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, Union, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional, Union
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,9 +15,10 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class UDPNIOType(str, Enum):
|
class UDPNIOType(str, Enum):
|
||||||
|
|||||||
@ -14,12 +14,13 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from ..common import NodeStatus, CustomAdapter
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from ..common import CustomAdapter, NodeStatus
|
||||||
|
|
||||||
|
|
||||||
class QemuPlatform(str, Enum):
|
class QemuPlatform(str, Enum):
|
||||||
|
|||||||
@ -14,12 +14,13 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from ..common import NodeStatus, CustomAdapter
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from ..common import CustomAdapter, NodeStatus
|
||||||
|
|
||||||
|
|
||||||
class VirtualBoxConsoleType(str, Enum):
|
class VirtualBoxConsoleType(str, Enum):
|
||||||
|
|||||||
@ -14,12 +14,13 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from ..common import NodeStatus, CustomAdapter
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from ..common import CustomAdapter, NodeStatus
|
||||||
|
|
||||||
|
|
||||||
class VMwareConsoleType(str, Enum):
|
class VMwareConsoleType(str, Enum):
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from ..common import NodeStatus
|
from ..common import NodeStatus
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,11 +15,11 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from pydantic import ConfigDict, BaseModel, Field, SecretStr, FilePath, DirectoryPath, field_validator, model_validator
|
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, DirectoryPath, Field, FilePath, SecretStr, field_validator, model_validator
|
||||||
|
|
||||||
|
|
||||||
class ControllerSettings(BaseModel):
|
class ControllerSettings(BaseModel):
|
||||||
jwt_secret_key: Optional[str] = Field(
|
jwt_secret_key: Optional[str] = Field(
|
||||||
|
|||||||
@ -19,9 +19,10 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Annotated, List, Literal, Optional, Union
|
from typing import Annotated, List, Literal, Optional, Union
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
from pydantic import AnyUrl, BaseModel, Discriminator, EmailStr, Field, Tag, model_validator
|
|
||||||
from ..common import ExtraConfig
|
|
||||||
|
|
||||||
|
from pydantic import AnyUrl, BaseModel, Discriminator, EmailStr, Field, Tag, model_validator
|
||||||
|
|
||||||
|
from ..common import ExtraConfig
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Shared Enums
|
# Shared Enums
|
||||||
|
|||||||
@ -14,8 +14,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from typing import Optional
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,9 +15,10 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from .nodes import NodeType
|
from .nodes import NodeType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,9 @@
|
|||||||
Chat API schemas for GNS3 Copilot integration.
|
Chat API schemas for GNS3 Copilot integration.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from typing import Any, Dict, List, Literal, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing import Optional, List, Dict, Any, Literal
|
|
||||||
|
|
||||||
|
|
||||||
class OpenAIToolCall(BaseModel):
|
class OpenAIToolCall(BaseModel):
|
||||||
|
|||||||
@ -15,13 +15,13 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from pydantic import ConfigDict, BaseModel, Field, SecretStr, field_validator, model_validator
|
|
||||||
from typing import List, Optional, Union, Any
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import Any, List, Optional, Union
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field, SecretStr, field_validator, model_validator
|
||||||
|
|
||||||
from .nodes import NodeType
|
|
||||||
from .base import DateTimeModelMixin
|
from .base import DateTimeModelMixin
|
||||||
|
from .nodes import NodeType
|
||||||
|
|
||||||
|
|
||||||
class Protocol(str, Enum):
|
class Protocol(str, Enum):
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class Drawing(BaseModel):
|
class Drawing(BaseModel):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -14,9 +14,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class WhenExit(str, Enum):
|
class WhenExit(str, Enum):
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import ConfigDict, BaseModel, Field
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Optional, Literal
|
from typing import Optional, Literal
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
from .base import DateTimeModelMixin
|
from .base import DateTimeModelMixin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,9 +14,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class Label(BaseModel):
|
class Label(BaseModel):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -14,11 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, field_validator
|
|
||||||
from typing import List, Optional, Tuple
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional, Tuple
|
||||||
from uuid import UUID, uuid4
|
from uuid import UUID, uuid4
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field, field_validator
|
||||||
|
|
||||||
from .labels import Label
|
from .labels import Label
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,12 +14,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from typing import Optional, Literal, Union
|
from typing import Literal, Optional, Union
|
||||||
from pydantic import BaseModel, Field, ConfigDict, field_validator
|
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from .base import DateTimeModelMixin
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||||
|
|
||||||
|
from .base import DateTimeModelMixin
|
||||||
|
|
||||||
# Valid model types
|
# Valid model types
|
||||||
ModelType = Literal["text", "vision", "stt", "tts", "multimodal", "embedding", "reranking", "other"]
|
ModelType = Literal["text", "vision", "stt", "tts", "multimodal", "embedding", "reranking", "other"]
|
||||||
|
|||||||
@ -15,9 +15,10 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class NetmikoDeviceType(BaseModel):
|
class NetmikoDeviceType(BaseModel):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -14,13 +14,14 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import List, Optional, Union
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional, Union
|
||||||
from uuid import UUID, uuid4
|
from uuid import UUID, uuid4
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
from ..common import ConsoleType, CustomAdapter, NodeStatus
|
||||||
from .labels import Label
|
from .labels import Label
|
||||||
from ..common import ConsoleType, NodeStatus, CustomAdapter
|
|
||||||
|
|
||||||
|
|
||||||
class NodeType(str, Enum):
|
class NodeType(str, Enum):
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from typing import Optional
|
|
||||||
from pydantic import ConfigDict, BaseModel, Field
|
|
||||||
from uuid import UUID
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import Optional
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
from .base import DateTimeModelMixin
|
from .base import DateTimeModelMixin
|
||||||
|
|
||||||
|
|||||||
@ -15,10 +15,11 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, HttpUrl
|
from enum import Enum
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
from enum import Enum
|
|
||||||
|
from pydantic import BaseModel, Field, HttpUrl
|
||||||
|
|
||||||
|
|
||||||
class ProjectStatus(str, Enum):
|
class ProjectStatus(str, Enum):
|
||||||
|
|||||||
@ -14,10 +14,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from typing import Optional, List
|
|
||||||
from pydantic import ConfigDict, BaseModel, Field
|
|
||||||
from uuid import UUID
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
from .base import DateTimeModelMixin
|
from .base import DateTimeModelMixin
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ a secret leak at worst.
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
from pydantic import ConfigDict, BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
from ..config import (
|
from ..config import (
|
||||||
BuiltinSymbolTheme,
|
BuiltinSymbolTheme,
|
||||||
|
|||||||
@ -15,10 +15,11 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class SnapshotBase(BaseModel):
|
class SnapshotBase(BaseModel):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -14,13 +14,14 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import ConfigDict, BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from ..nodes import NodeType
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
from ..base import DateTimeModelMixin
|
from ..base import DateTimeModelMixin
|
||||||
|
from ..nodes import NodeType
|
||||||
|
|
||||||
|
|
||||||
class Category(str, Enum):
|
class Category(str, Enum):
|
||||||
|
|||||||
@ -15,11 +15,13 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import List, Optional, Union
|
||||||
from gns3server.schemas.compute.cloud_nodes import EthernetPort, TAPPort, UDPPort, CloudConsoleType
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, Union, List
|
|
||||||
|
from gns3server.schemas.compute.cloud_nodes import CloudConsoleType, EthernetPort, TAPPort, UDPPort
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class CloudTemplate(TemplateBase):
|
class CloudTemplate(TemplateBase):
|
||||||
|
|||||||
@ -15,11 +15,12 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import List, Optional
|
||||||
from ...common import ConsoleType, AuxType, CustomAdapter, ExtraConfig
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, List
|
|
||||||
|
from ...common import AuxType, ConsoleType, CustomAdapter, ExtraConfig
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class DockerTemplateBase(TemplateBase):
|
class DockerTemplateBase(TemplateBase):
|
||||||
|
|||||||
@ -14,20 +14,21 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from enum import Enum
|
||||||
|
from typing import Optional
|
||||||
from gns3server.schemas.compute.dynamips_nodes import (
|
|
||||||
DynamipsConsoleType,
|
|
||||||
DynamipsPlatform,
|
|
||||||
DynamipsAdapters,
|
|
||||||
DynamipsWics,
|
|
||||||
DynamipsNPE,
|
|
||||||
DynamipsMidplane,
|
|
||||||
)
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional
|
|
||||||
from enum import Enum
|
from gns3server.schemas.compute.dynamips_nodes import (
|
||||||
|
DynamipsAdapters,
|
||||||
|
DynamipsConsoleType,
|
||||||
|
DynamipsMidplane,
|
||||||
|
DynamipsNPE,
|
||||||
|
DynamipsPlatform,
|
||||||
|
DynamipsWics,
|
||||||
|
)
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class DynamipsTemplateBase(TemplateBase):
|
class DynamipsTemplateBase(TemplateBase):
|
||||||
|
|||||||
@ -14,12 +14,13 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import List, Optional
|
||||||
from gns3server.schemas.compute.ethernet_hub_nodes import EthernetHubPort
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, List
|
|
||||||
|
|
||||||
|
from gns3server.schemas.compute.ethernet_hub_nodes import EthernetHubPort
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
DEFAULT_PORTS = [
|
DEFAULT_PORTS = [
|
||||||
EthernetHubPort(port_number=0, name="Ethernet0"),
|
EthernetHubPort(port_number=0, name="Ethernet0"),
|
||||||
|
|||||||
@ -15,12 +15,14 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from enum import Enum
|
||||||
from gns3server.schemas.compute.ethernet_switch_nodes import EthernetSwitchPort
|
from typing import List, Optional
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
from gns3server.schemas.compute.ethernet_switch_nodes import EthernetSwitchPort
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
DEFAULT_PORTS = [
|
DEFAULT_PORTS = [
|
||||||
EthernetSwitchPort(port_number=0, name="Ethernet0", vlan=1, type="access", ethertype="0x8100"),
|
EthernetSwitchPort(port_number=0, name="Ethernet0", vlan=1, type="access", ethertype="0x8100"),
|
||||||
|
|||||||
@ -15,11 +15,13 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import Optional
|
||||||
from gns3server.schemas.compute.iou_nodes import ConsoleType
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional
|
|
||||||
|
from gns3server.schemas.compute.iou_nodes import ConsoleType
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class IOUTemplateBase(TemplateBase):
|
class IOUTemplateBase(TemplateBase):
|
||||||
|
|||||||
@ -15,20 +15,22 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import List, Optional
|
||||||
from gns3server.schemas.compute.qemu_nodes import (
|
|
||||||
QemuConsoleType,
|
|
||||||
QemuPlatform,
|
|
||||||
QemuAdapterType,
|
|
||||||
QemuOnCloseAction,
|
|
||||||
QemuBootPriority,
|
|
||||||
QemuDiskInterfaceType,
|
|
||||||
QemuProcessPriority,
|
|
||||||
CustomAdapter,
|
|
||||||
)
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, List
|
|
||||||
|
from gns3server.schemas.compute.qemu_nodes import (
|
||||||
|
CustomAdapter,
|
||||||
|
QemuAdapterType,
|
||||||
|
QemuBootPriority,
|
||||||
|
QemuConsoleType,
|
||||||
|
QemuDiskInterfaceType,
|
||||||
|
QemuOnCloseAction,
|
||||||
|
QemuPlatform,
|
||||||
|
QemuProcessPriority,
|
||||||
|
)
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class QemuTemplate(TemplateBase):
|
class QemuTemplate(TemplateBase):
|
||||||
|
|||||||
@ -14,16 +14,18 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import List, Optional
|
||||||
from gns3server.schemas.compute.virtualbox_nodes import (
|
|
||||||
VirtualBoxConsoleType,
|
|
||||||
VirtualBoxAdapterType,
|
|
||||||
VirtualBoxOnCloseAction,
|
|
||||||
CustomAdapter,
|
|
||||||
)
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, List
|
|
||||||
|
from gns3server.schemas.compute.virtualbox_nodes import (
|
||||||
|
CustomAdapter,
|
||||||
|
VirtualBoxAdapterType,
|
||||||
|
VirtualBoxConsoleType,
|
||||||
|
VirtualBoxOnCloseAction,
|
||||||
|
)
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class VirtualBoxTemplateBase(TemplateBase):
|
class VirtualBoxTemplateBase(TemplateBase):
|
||||||
|
|||||||
@ -15,16 +15,18 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import List, Optional
|
||||||
from gns3server.schemas.compute.vmware_nodes import (
|
|
||||||
VMwareConsoleType,
|
|
||||||
VMwareAdapterType,
|
|
||||||
VMwareOnCloseAction,
|
|
||||||
CustomAdapter,
|
|
||||||
)
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional, List
|
|
||||||
|
from gns3server.schemas.compute.vmware_nodes import (
|
||||||
|
CustomAdapter,
|
||||||
|
VMwareAdapterType,
|
||||||
|
VMwareConsoleType,
|
||||||
|
VMwareOnCloseAction,
|
||||||
|
)
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class VMwareTemplateBase(TemplateBase):
|
class VMwareTemplateBase(TemplateBase):
|
||||||
|
|||||||
@ -15,11 +15,13 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from . import Category, TemplateBase
|
from typing import Optional
|
||||||
from gns3server.schemas.compute.vpcs_nodes import ConsoleType
|
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from typing import Optional
|
|
||||||
|
from gns3server.schemas.compute.vpcs_nodes import ConsoleType
|
||||||
|
|
||||||
|
from . import Category, TemplateBase
|
||||||
|
|
||||||
|
|
||||||
class VPCSTemplate(TemplateBase):
|
class VPCSTemplate(TemplateBase):
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,18 +19,18 @@
|
|||||||
# This file contains the validation for checking a .gns3 file
|
# This file contains the validation for checking a .gns3 file
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from enum import Enum
|
||||||
|
from typing import List, Optional
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from .computes import Compute
|
from .computes import Compute
|
||||||
from .drawings import Drawing
|
from .drawings import Drawing
|
||||||
from .links import Link
|
from .links import Link
|
||||||
from .nodes import Node
|
from .nodes import Node
|
||||||
|
|
||||||
from .projects import Supplier, Variable
|
from .projects import Supplier, Variable
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional, List
|
|
||||||
from enum import Enum
|
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
|
|
||||||
class TopologyType(str, Enum):
|
class TopologyType(str, Enum):
|
||||||
topology = "topology"
|
topology = "topology"
|
||||||
|
|||||||
@ -16,9 +16,10 @@
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from pydantic import ConfigDict, EmailStr, BaseModel, Field, SecretStr
|
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict, EmailStr, Field, SecretStr
|
||||||
|
|
||||||
from .base import DateTimeModelMixin
|
from .base import DateTimeModelMixin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,9 +14,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class QemuDiskImageFormat(str, Enum):
|
class QemuDiskImageFormat(str, Enum):
|
||||||
|
|||||||
@ -14,9 +14,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class Version(BaseModel):
|
class Version(BaseModel):
|
||||||
controller_host: Optional[str] = Field(None, description="Controller hostname or IP address")
|
controller_host: Optional[str] = Field(None, description="Controller hostname or IP address")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user