Commit Graph

5 Commits

Author SHA1 Message Date
IluaAir
72cd796803 Refactor parse method in BaseDevice for improved readability
- Simplified the `parse` method in the `BaseDevice` class by directly returning a `Device` instance with keyword arguments, enhancing code clarity and maintainability.
2026-02-18 00:11:14 +03:00
IluaAir
e82bc25346 Refactor BaseDevice and update Device model structure
- Enhanced the `BaseDevice` class with methods for loading templates and parsing configuration data using TTP.
- Updated the `Device` model to use lists for `interfaces` and `vlans`, allowing for multiple entries.
- Introduced new TTP template files for structured data parsing.
2026-02-18 00:06:48 +03:00
IluaAir
2cfcc41e58 Enhance device interface structure and update dependencies
- Added `.idea` to `.gitignore` to exclude IDE configuration files.
- Introduced `pydantic` version `2.12.5` as a dependency in `pyproject.toml` and `uv.lock`.
- Added `annotated-types` as a new dependency in `uv.lock`.
- Refactored `BaseDevice` class to include abstract methods for device properties and loading templates.
- Created `Interfaces`, `System`, `Vlans`, and `Device` models in a new `contract.py` file for structured data handling.
- Updated `Mikrotik` class to implement the new `BaseDevice` structure and added a template loading method.
2026-02-16 00:57:09 +03:00
IluaAir
544688dae1 Update .gitignore and refactor Mikrotik model to inherit from BaseDevice
- Added *.txt files to .gitignore to exclude etc files.
- Refactored Mikrotik class to inherit from BaseDevice for improved structure and functionality.
2026-02-15 02:44:29 +03:00
IluaAir
b60182ef3c 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.
2026-02-14 21:31:02 +03:00