Update Interfaces model and Mikrotik template for improved data handling

- Made the `description` field in the `Interfaces` model optional to enhance flexibility.
- Renamed `id` to `vlan_id` in the `Vlans` model for clarity.
- Refactored the `Mikrotik` class methods to streamline raw data access and removed unnecessary print statements.
- Updated the Mikrotik TTP template to reflect changes in variable names and improve overall structure for interface and VLAN configurations.
This commit is contained in:
IluaAir
2026-02-19 00:31:54 +03:00
parent 685ff19d2f
commit a938fe2d47
3 changed files with 19 additions and 23 deletions

View File

@@ -6,7 +6,7 @@ class Interfaces(BaseModel):
name: str
ip_address: IPv4Address | None = None
mask: int | None = None
description: str
description: str | None = None
class System(BaseModel):
@@ -16,7 +16,7 @@ class System(BaseModel):
class Vlans(BaseModel):
id: int
vlan_id: int
name: str | None = Field(default=None, alias="description")