Форматирование всего серверного кода по стандартам (black)
This commit is contained in:
parent
e61ffd793c
commit
06a5a758a3
28 changed files with 611 additions and 305 deletions
|
|
@ -12,6 +12,7 @@ class IPv4Route(BaseModel):
|
|||
next_hop (str): Адрес следующего узла (маршрутизатор)
|
||||
metric (int): Метрика маршрута
|
||||
"""
|
||||
|
||||
destination: str
|
||||
prefix: int
|
||||
next_hop: str
|
||||
|
|
@ -28,6 +29,7 @@ class IPv6Route(BaseModel):
|
|||
next_hop (str): Адрес следующего узла (маршрутизатор)
|
||||
metric (int): Метрика маршрута
|
||||
"""
|
||||
|
||||
destination: str
|
||||
prefix: int
|
||||
next_hop: str
|
||||
|
|
@ -45,6 +47,7 @@ class IndividualIPConfig(BaseModel):
|
|||
gateway (str): Основной шлюз по умолчанию
|
||||
dns (List[str]): Список DNS-серверов
|
||||
"""
|
||||
|
||||
address: str
|
||||
routes: List[Union[IPv4Route, IPv6Route]]
|
||||
method: Optional[str]
|
||||
|
|
@ -59,6 +62,7 @@ class IPConfig(BaseModel):
|
|||
Атрибуты:
|
||||
configurations (List[IndividualIPConfig]): Список индивидуальных IP-конфигураций
|
||||
"""
|
||||
|
||||
configurations: List[IndividualIPConfig]
|
||||
|
||||
|
||||
|
|
@ -78,6 +82,7 @@ class NetworkInterface(BaseModel):
|
|||
container_x (int): Положение по X на холсте
|
||||
container_y (int): Положение по Y на холсте
|
||||
"""
|
||||
|
||||
name: str
|
||||
type: str
|
||||
mac_address: str
|
||||
|
|
@ -102,6 +107,7 @@ class WiFiDevice(NetworkInterface):
|
|||
frequency (Optional[float]): Частота
|
||||
mode (Union[str, int]): Режим работы
|
||||
"""
|
||||
|
||||
ssid: Optional[str] = None
|
||||
bssid: Optional[str] = None
|
||||
bitrate: Optional[int] = None
|
||||
|
|
@ -119,6 +125,7 @@ class NetworkInterfacesContainer(BaseModel):
|
|||
container_x (int): Положение по оси X
|
||||
container_y (int): Положение по оси Y
|
||||
"""
|
||||
|
||||
interfaces: List[Union[NetworkInterface, WiFiDevice]]
|
||||
container_x: int
|
||||
container_y: int
|
||||
|
|
@ -135,6 +142,7 @@ class Activation(BaseModel):
|
|||
container_y (int): Положение по Y на холсте
|
||||
isOpen (bool): Флаг скрытия ноды на холсте
|
||||
"""
|
||||
|
||||
id: int
|
||||
interfaces: List[Union[NetworkInterface, WiFiDevice]]
|
||||
container_x: int
|
||||
|
|
@ -153,6 +161,7 @@ class Deactivation(BaseModel):
|
|||
container_y (int): Положение по Y на холсте
|
||||
isOpen (bool): Флаг скрытия ноды на холсте
|
||||
"""
|
||||
|
||||
id: int
|
||||
interfaces: List[Union[NetworkInterface, WiFiDevice]]
|
||||
container_x: int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue