2025-10-14 16:11:12 +05:00
|
|
|
# models.network
|
|
|
|
|
|
|
|
|
|
### *class* models.network.Activation(, id: int, interfaces: List[NetworkInterface | WiFiDevice], container_x: int, container_y: int, isOpen: bool = True)
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Модель узла активных интерфейсов.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `id` (int): Идентификатор ноды.
|
|
|
|
|
- `interfaces` (List[Union[NetworkInterface, WiFiDevice]]): Активные интерфейсы.
|
|
|
|
|
- `container_x` (int): Координата X на холсте.
|
|
|
|
|
- `container_y` (int): Координата Y на холсте.
|
|
|
|
|
- `isOpen` (bool): Флаг отображения узла на холсте.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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)
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Модель узла отключённых интерфейсов.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `id` (int): Идентификатор ноды.
|
|
|
|
|
- `interfaces` (List[Union[NetworkInterface, WiFiDevice]]): Список отключённых интерфейсов.
|
|
|
|
|
- `container_x` (int): Координата X на холсте.
|
|
|
|
|
- `container_y` (int): Координата Y на холсте.
|
|
|
|
|
- `isOpen` (bool): Флаг отображения узла на холсте.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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])
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Групповая конфигурация IP-адресов.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `configurations` (List[IndividualIPConfig]): Индивидуальные IP-конфигурации.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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)
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Модель маршрута IPv4.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `destination` (str): IP-адрес назначения.
|
|
|
|
|
- `prefix` (int): Префикс подсети в формате CIDR.
|
|
|
|
|
- `next_hop` (str): Адрес следующего узла (маршрутизатор).
|
|
|
|
|
- `metric` (int): Метрика маршрута.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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)
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Модель маршрута IPv6.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `destination` (str): IP-адрес назначения.
|
|
|
|
|
- `prefix` (int): Префикс подсети в формате CIDR.
|
|
|
|
|
- `next_hop` (str): Адрес следующего узла.
|
|
|
|
|
- `metric` (int): Метрика маршрута.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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])
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Модель индивидуальной конфигурации IP-адреса.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `address` (str): IP-адрес интерфейса.
|
|
|
|
|
- `routes` (List[Union[IPv4Route, IPv6Route]]): Список маршрутов.
|
|
|
|
|
- `method` (Optional[str]): Метод назначения IP.
|
|
|
|
|
- `gateway` (str): Шлюз по умолчанию.
|
|
|
|
|
- `dns` (List[str]): Список DNS-серверов.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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)
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Модель базового сетевого интерфейса.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `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 на холсте.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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)
|
|
|
|
|
|
|
|
|
|
Bases: `BaseModel`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Контейнер для набора сетевых интерфейсов.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `interfaces` (List[Union[NetworkInterface, WiFiDevice]]): Список интерфейсов.
|
|
|
|
|
- `container_x` (int): Положение по оси X.
|
|
|
|
|
- `container_y` (int): Положение по оси Y.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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)
|
|
|
|
|
|
|
|
|
|
Bases: `NetworkInterface`
|
|
|
|
|
|
2025-10-21 10:51:32 +05:00
|
|
|
Расширенная модель Wi-Fi устройства.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
Атрибуты:
|
2025-10-21 10:51:32 +05:00
|
|
|
|
|
|
|
|
- `ssid` (Optional[str]): Название Wi-Fi сети.
|
|
|
|
|
- `bssid` (Optional[str]): MAC-адрес точки доступа.
|
|
|
|
|
- `bitrate` (Optional[int]): Скорость соединения.
|
|
|
|
|
- `strength` (Optional[int]): Уровень сигнала.
|
|
|
|
|
- `frequency` (Optional[float]): Рабочая частота.
|
|
|
|
|
- `mode` (Union[str, int]): Режим работы.
|
2025-10-14 16:11:12 +05:00
|
|
|
|
|
|
|
|
#### 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*
|