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:
@@ -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")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user