models.network

class models.network.Activation(*, id: int, interfaces: List[NetworkInterface | WiFiDevice], container_x: int, container_y: int, isOpen: bool = True)[source]

Bases: BaseModel

Модель активированных интерфейсов

Атрибуты:

id (int): Идентификатор ноды активированных интерфейсов interfaces (List[Union[NetworkInterface, WiFiDevice]]): Активированные интерфейсы container_x (int): Положение по X на холсте container_y (int): Положение по Y на холсте isOpen (bool): Флаг скрытия ноды на холсте

container_x: int
container_y: int
id: int
interfaces: List[NetworkInterface | WiFiDevice]
isOpen: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class models.network.Deactivation(*, id: int, interfaces: List[NetworkInterface | WiFiDevice], container_x: int, container_y: int, isOpen: bool = True)[source]

Bases: BaseModel

Модель отключенных интерфейсов

Атрибуты:

id (int): Идентификатор ноды отключенных интерфейсов interfaces (List[Union[NetworkInterface, WiFiDevice]]): Отключенные интерфейсы container_x (int): Положение по X на холсте container_y (int): Положение по Y на холсте isOpen (bool): Флаг скрытия ноды на холсте

container_x: int
container_y: int
id: int
interfaces: List[NetworkInterface | WiFiDevice]
isOpen: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class models.network.IPConfig(*, configurations: List[IndividualIPConfig])[source]

Bases: BaseModel

Модель конфигурации IP (IPv4/IPv6)

Атрибуты:

configurations (List[IndividualIPConfig]): Список индивидуальных IP-конфигураций

configurations: List[IndividualIPConfig]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class models.network.IPv4Route(*, destination: str, prefix: int, next_hop: str, metric: int)[source]

Bases: BaseModel

Модель маршрута IPv4

Атрибуты:

destination (str): IP-адрес назначения prefix (int): Префикс подсети в формате CIDR next_hop (str): Адрес следующего узла (маршрутизатор) metric (int): Метрика маршрута

destination: str
metric: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

next_hop: str
prefix: int
class models.network.IPv6Route(*, destination: str, prefix: int, next_hop: str, metric: int)[source]

Bases: BaseModel

Модель маршрута IPv6

Атрибуты:

destination (str): IP-адрес назначения prefix (int): Префикс подсети (CIDR) next_hop (str): Адрес следующего узла (маршрутизатор) metric (int): Метрика маршрута

destination: str
metric: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

next_hop: str
prefix: int
class models.network.IndividualIPConfig(*, address: str, routes: List[IPv4Route | IPv6Route], method: str | None, gateway: str, dns: List[str])[source]

Bases: BaseModel

Модель индивидуальной конфигурации IP-адреса

Атрибуты:

address (str): IP-адрес интерфейса routes (List[Union[IPv4Route, IPv6Route]]): Список маршрутов (IPv4/IPv6) method (Optional[str]): Метод назначения IP gateway (str): Основной шлюз по умолчанию dns (List[str]): Список DNS-серверов

address: str
dns: List[str]
gateway: str
method: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

routes: List[IPv4Route | IPv6Route]
class models.network.NetworkInterface(*, name: str, type: str, mac_address: str, device_state: str, active_connection: str, device_mtu: str, ipv4: IPConfig, ipv6: IPConfig, container_x: int = 0, container_y: int = 0)[source]

Bases: BaseModel

Модель базового сетевого интерфейса

Атрибуты:

name (str): Название интерфейса type (str): Тип интерфейса mac_address (str): MAC-адрес устройства device_state (str): Состояние устройства active_connection (str): Название активного соединения device_mtu (str): MTU устройства ipv4 (IPConfig): Конфигурация IPv4 ipv6 (IPConfig): Конфигурация IPv6 container_x (int): Положение по X на холсте container_y (int): Положение по Y на холсте

active_connection: str
container_x: int
container_y: int
device_mtu: str
device_state: str
ipv4: IPConfig
ipv6: IPConfig
mac_address: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
type: str
class models.network.NetworkInterfacesContainer(*, interfaces: List[NetworkInterface | WiFiDevice], container_x: int, container_y: int)[source]

Bases: BaseModel

Контейнер для группы сетевых интерфейсов с координатами

Атрибуты:

interfaces (List[Union[NetworkInterface, WiFiDevice]]): Список интерфейсов container_x (int): Положение по оси X container_y (int): Положение по оси Y

container_x: int
container_y: int
interfaces: List[NetworkInterface | WiFiDevice]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class models.network.WiFiDevice(*, name: str, type: str, mac_address: str, device_state: str, active_connection: str, device_mtu: str, ipv4: IPConfig, ipv6: IPConfig, container_x: int = 0, container_y: int = 0, ssid: str | None = None, bssid: str | None = None, bitrate: int | None = None, strength: int | None = None, frequency: float | None = None, mode: str | int = None)[source]

Bases: NetworkInterface

Модель Wi-Fi устройства (наследуется от NetworkInterface)

Атрибуты:

ssid (Optional[str]): Название Wi-Fi сети bssid (Optional[str]): MAC-адрес точки доступа bitrate (Optional[int]): Скорость соединения strength (Optional[int]): Уровень сигнала frequency (Optional[float]): Частота mode (Union[str, int]): Режим работы

bitrate: int | None
bssid: str | None
frequency: float | None
mode: str | int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ssid: str | None
strength: int | None