Add ttp dependency and refactor OxiAPI and NodeConfig classes
- Added `ttp` as a dependency in `pyproject.toml` and `uv.lock`. - Updated `NodeConfig` to store model names in lowercase. - Refactored `OxiAPI` to always create a new session and added a `close` method. - Removed unnecessary logging in `Node` class. - Introduced interfaces for device registration with a new `BaseDevice` class and a `register_parser` function. - Created initial structure for device models, including a `Mikrotik` parser.
This commit is contained in:
7
oxi/interfaces/models/__init__.py
Normal file
7
oxi/interfaces/models/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import importlib
|
||||
import pkgutil
|
||||
|
||||
package = __package__
|
||||
|
||||
for loader, module_name, is_pkg in pkgutil.iter_modules(__path__):
|
||||
importlib.import_module(f"{package}.{module_name}")
|
||||
5
oxi/interfaces/models/mikrotik.py
Normal file
5
oxi/interfaces/models/mikrotik.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from oxi.interfaces import register_parser
|
||||
|
||||
|
||||
@register_parser(["routeros", "ros", "mikrotik"])
|
||||
class Mikrotik: ...
|
||||
Reference in New Issue
Block a user