gonets/SRV/docs/_build/markdown/api/models/subnet.md

74 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2025-10-14 16:11:12 +05:00
# 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`
Модель устройства, обнаруженного в подсети.
2025-10-14 16:11:12 +05:00
Атрибуты:
- `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]): Пользовательская заметка.
2025-10-14 16:11:12 +05:00
#### 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`
Параметры запроса на сканирование подсети.
2025-10-14 16:11:12 +05:00
Атрибуты:
- `subnet` (Optional[str]): CIDR подсети (например, `192.168.1.0/24`).
2025-10-14 16:11:12 +05:00
#### 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`
Результат сканирования подсети.
2025-10-14 16:11:12 +05:00
Атрибуты:
- `devices` (List[Device]): Найденные устройства.
- `error` (Optional[str]): Сообщение об ошибке сканирования.
2025-10-14 16:11:12 +05:00
#### devices *: List[Device]*
#### error *: str | None*
#### model_config *: ClassVar[ConfigDict]* *= {}*
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].