Commit Graph

5 Commits

Author SHA1 Message Date
IluaAir
ac835d6b56 Enhance ModelView class with iterable and indexing support
- Added iterator, length, and item access methods to the `ModelView` class, allowing it to handle single models and lists more effectively.
- Refactored the `vlans` method in the `Keenetic` model to restore functionality for decoding VLAN descriptions, improving data processing consistency.
2026-02-24 23:19:57 +03:00
IluaAir
753268a381 Refactor BaseDevice and Interfaces models for improved validation and structure
- Introduced `_declared_sections` in `BaseDevice` to track declared template groups.
- Enhanced `_validate_contract` method to conditionally validate VLANs based on declared sections.
- Updated docstrings in `BaseDevice` and `Interfaces` models for clarity on expected structures.
- Refactored `Interfaces` and `Vlans` models to improve field definitions and aliases.
- Commented out unused `vlans` method in `Keenetic` model for future reference.
2026-02-22 15:52:45 +03:00
IluaAir
3635a07b27 Refactor BaseDevice methods for improved data handling and validation
- Updated the `BaseDevice` class to replace `_raw` with `raw` for consistency in data access.
- Enhanced the `vlans`, `interfaces`, and `system` methods to utilize the new `raw` attribute.
- Introduced a `_validate_contract` method to streamline the validation of parsed data into structured models.
- Adjusted the `Keenetic` and `Mikrotik` models to align with the updated data handling approach, ensuring proper parsing and decoding of interface and VLAN data.
2026-02-22 09:52:17 +03:00
IluaAir
2394296f5b Enhance Keenetic model and update templates for improved data handling
- Implemented the `interfaces` and `vlans` methods in the `Keenetic` model to process and decode interface and VLAN data.
- Added a `_decode_utf` method to handle UTF-8 encoded descriptions.
- Updated the Keenetic TTP template to define structured groups for system, interfaces, and VLANs.
- Refactored file paths in the `Mikrotik` model for consistency and clarity.
2026-02-22 00:21:55 +03:00
IluaAir
a41cb1f7ec """
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.
"""
2026-02-19 00:49:10 +03:00