models.subnet¶
- class models.subnet.Device(*, ip: str, mac: str | None = None, hostname: str | None = None, vendor: str | None = None, open_ports: List[str] = [], status: str, last_seen: str | None = None, note: str | None = None)[source]¶
Bases:
BaseModelСканируемое устройство в подсети
- Атрибуты:
ip (str): IP-адрес устройства mac (Optional[str]): MAC-адрес устройства hostname (Optional[str]): Имя хоста vendor (Optional[str]): Название производителя устройства (По MAC-адресу) open_ports (List[str]): Открытые порты устройства status (str): Статус устройства (онлайн/оффлайн) last_seen (Optional[str]): Последняя активность устройства note (Optional[str]): Заметка устройства
- hostname: str | None¶
- ip: str¶
- last_seen: str | None¶
- mac: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- note: str | None¶
- open_ports: List[str]¶
- status: str¶
- vendor: str | None¶
- class models.subnet.SubnetScanRequest(*, subnet: str | None = None)[source]¶
Bases:
BaseModelПараметры для сканирования подсети
- Атрибуты:
subnet (Optional[str]): Подсеть для сканирования (например 192.168.1.0/24), опционально
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- subnet: str | None¶
- class models.subnet.SubnetScanResult(*, devices: List[Device] = [], error: str | None = None)[source]¶
Bases:
BaseModelРезультат сканирования устройств в подсети
- Атрибуты:
devices (List[Device]): Список просканированных устройств error (Optional[str]): Сообщение об ошибке, если сканирование не удалось
- error: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].