"""
Implement Keenetic model and enhance BaseDevice documentation - Added a new `Keenetic` model that registers a parser for KeeneticOS, extending the `BaseDevice` class. - Updated docstrings in the `BaseDevice` class methods to provide clearer descriptions of their functionality and expected data structures. - Introduced `model_config` in the `Vlans` model to enable name-based population. - Removed unnecessary print statements from the `Mikrotik` model methods to streamline output. """
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from ipaddress import IPv4Address
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class Interfaces(BaseModel):
|
||||
@@ -16,6 +16,8 @@ class System(BaseModel):
|
||||
|
||||
|
||||
class Vlans(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
vlan_id: int
|
||||
name: str | None = Field(default=None, alias="description")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user