mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
style: sort imports in schemas
This commit is contained in:
1 parent
634189d443
commit
3b993b464f
51 files changed
+271
-219
No files matched your search
@@ -14,13 +14,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# 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 typing import List, Optional
|
||||
from uuid import UUID
|
||||
|
||||
from ..nodes import NodeType
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from ..base import DateTimeModelMixin
|
||||
from ..nodes import NodeType
|
||||
|
||||
|
||||
class Category(str, Enum):
|
||||
|
||||
@@ -15,11 +15,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.cloud_nodes import EthernetPort, TAPPort, UDPPort, CloudConsoleType
|
||||
from typing import List, Optional, Union
|
||||
|
||||
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):
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from ...common import ConsoleType, AuxType, CustomAdapter, ExtraConfig
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import Field
|
||||
from typing import Optional, List
|
||||
|
||||
from ...common import AuxType, ConsoleType, CustomAdapter, ExtraConfig
|
||||
from . import Category, TemplateBase
|
||||
|
||||
|
||||
class DockerTemplateBase(TemplateBase):
|
||||
|
||||
@@ -14,20 +14,21 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import Category, TemplateBase
|
||||
|
||||
from gns3server.schemas.compute.dynamips_nodes import (
|
||||
DynamipsConsoleType,
|
||||
DynamipsPlatform,
|
||||
DynamipsAdapters,
|
||||
DynamipsWics,
|
||||
DynamipsNPE,
|
||||
DynamipsMidplane,
|
||||
)
|
||||
from enum import Enum
|
||||
from typing import Optional
|
||||
|
||||
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):
|
||||
|
||||
@@ -14,12 +14,13 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.ethernet_hub_nodes import EthernetHubPort
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import Field
|
||||
from typing import Optional, List
|
||||
|
||||
from gns3server.schemas.compute.ethernet_hub_nodes import EthernetHubPort
|
||||
|
||||
from . import Category, TemplateBase
|
||||
|
||||
DEFAULT_PORTS = [
|
||||
EthernetHubPort(port_number=0, name="Ethernet0"),
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.ethernet_switch_nodes import EthernetSwitchPort
|
||||
from enum import Enum
|
||||
from typing import List, Optional
|
||||
|
||||
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 = [
|
||||
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/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.iou_nodes import ConsoleType
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import Field
|
||||
from typing import Optional
|
||||
|
||||
from gns3server.schemas.compute.iou_nodes import ConsoleType
|
||||
|
||||
from . import Category, TemplateBase
|
||||
|
||||
|
||||
class IOUTemplateBase(TemplateBase):
|
||||
|
||||
@@ -15,20 +15,22 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.qemu_nodes import (
|
||||
QemuConsoleType,
|
||||
QemuPlatform,
|
||||
QemuAdapterType,
|
||||
QemuOnCloseAction,
|
||||
QemuBootPriority,
|
||||
QemuDiskInterfaceType,
|
||||
QemuProcessPriority,
|
||||
CustomAdapter,
|
||||
)
|
||||
from typing import List, Optional
|
||||
|
||||
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):
|
||||
|
||||
@@ -14,16 +14,18 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.virtualbox_nodes import (
|
||||
VirtualBoxConsoleType,
|
||||
VirtualBoxAdapterType,
|
||||
VirtualBoxOnCloseAction,
|
||||
CustomAdapter,
|
||||
)
|
||||
from typing import List, Optional
|
||||
|
||||
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):
|
||||
|
||||
@@ -15,16 +15,18 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.vmware_nodes import (
|
||||
VMwareConsoleType,
|
||||
VMwareAdapterType,
|
||||
VMwareOnCloseAction,
|
||||
CustomAdapter,
|
||||
)
|
||||
from typing import List, Optional
|
||||
|
||||
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):
|
||||
|
||||
@@ -15,11 +15,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import Category, TemplateBase
|
||||
from gns3server.schemas.compute.vpcs_nodes import ConsoleType
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import Field
|
||||
from typing import Optional
|
||||
|
||||
from gns3server.schemas.compute.vpcs_nodes import ConsoleType
|
||||
|
||||
from . import Category, TemplateBase
|
||||
|
||||
|
||||
class VPCSTemplate(TemplateBase):
|
||||
|
||||
Reference in new issue
Block a user