"""
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:
20
oxi/interfaces/models/keenetic.py
Normal file
20
oxi/interfaces/models/keenetic.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from oxi.interfaces import register_parser
|
||||
from oxi.interfaces.base import BaseDevice
|
||||
|
||||
|
||||
@register_parser(["NDMS", "keenetic", "KeeneticOS"])
|
||||
class Keenetic(BaseDevice):
|
||||
template = "keenetic.ttp"
|
||||
|
||||
def system(self): ...
|
||||
|
||||
def interfaces(self): ...
|
||||
|
||||
def vlans(self): ...
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open("../../test2.txt") as file:
|
||||
data = file.read()
|
||||
mikr = Keenetic(data)
|
||||
print(mikr.parse().json())
|
||||
Reference in New Issue
Block a user