2.3 KiB
2.3 KiB
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)
Bases: BaseModel
Модель устройства, обнаруженного в подсети.
Атрибуты:
ip(str): IP-адрес устройства.mac(Optional[str]): MAC-адрес устройства.hostname(Optional[str]): Имя хоста.vendor(Optional[str]): Производитель оборудования.open_ports(List[str]): Открытые порты.status(str): Состояние устройства (online/offline).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)
Bases: BaseModel
Параметры запроса на сканирование подсети.
Атрибуты:
subnet(Optional[str]): CIDR подсети (например,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)
Bases: BaseModel
Результат сканирования подсети.
Атрибуты:
devices(List[Device]): Найденные устройства.error(Optional[str]): Сообщение об ошибке сканирования.
devices : List[Device]
error : str | None
model_config : ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].