- Revised the project description in `pyproject.toml` to better reflect the functionality of the `oxipy` client.
- Improved the README.md by adding detailed explanations of the project structure, installation instructions, and usage examples.
- Updated documentation files to enhance clarity and organization, including sections on extending models and writing TTP templates.
- Adjusted various TTP templates to ensure consistency and accuracy in the parsing of device configurations.
- Introduced a new helper function `_expand_vlan_range` to convert VLAN range strings into a list of individual VLAN IDs.
- Enhanced the `vlans` method in the `Qtech` class to utilize the new function, improving the handling of VLAN IDs and ensuring proper processing of both individual and range-based VLAN inputs.
- Modified the Huawei TTP template to enhance the system information output by including the line identifier and slot number alongside the version and serial number. This change aims to provide clearer context for system diagnostics.
- Changed the required Python version in `pyproject.toml` from 3.11 to 3.10 to broaden compatibility.
- Removed an unused import from `oxi/conf.py` to streamline the code and improve readability.
- Updated the `BaseDevice` class constructor to accept an optional `name` parameter for better context in error messages.
- Improved the `_validate_contract` method to raise an `OxiAPIError` with a descriptive message if the node is not found.
- Modified the `_run_ttp` method to include a check for node existence, returning `None` if not found.
- Changed the test file name in the `Eltex` model to reflect a more descriptive context for testing node not found scenarios.
- Added a new helper function `_looks_like_node_not_found_html` to identify NodeNotFound errors based on HTTP response content.
- Updated the `from_http_error` method in the `OxiAPIError` class to convert 500 status codes to 404 when a NodeNotFound error is detected, improving error handling and user feedback.
- Updated the `reload` method in the `OxiAPI` class to catch `HTTPError` exceptions and raise a custom `OxiAPIError` with context.
- Improved the `__call__` method in the `Node` class to handle `HTTPError` exceptions similarly, providing context-specific error messages.
- Introduced a new class method `from_http_error` in `OxiAPIError` for standardized error message generation based on HTTP status codes.
- Introduced a new `OxiAPIError` class to standardize error reporting in the OxiAPI.
- The class includes an optional status code for enhanced context in error messages.
- Introduced a new `OxiAdapter` class that extends `HTTPAdapter` to manage timeouts and retries for HTTP requests.
- Integrated the `OxiAdapter` into the `OxiAPI` class, setting a default timeout and enabling retry logic for both HTTP and HTTPS requests.
- Updated the `OxiAPI` class to check for `None` explicitly when setting authentication credentials.
- Added type hints to the `Node` class and introduced a TODO for future enhancements.
- Refactored properties in the `NodeView` class to include type hints and improved handling of optional data retrieval.
- Removed the `system` method from the `Quasar` model to streamline system information handling.
- Updated the TTP template to enhance the formatting of system details, including version and product information, for improved clarity and organization.
- Implemented a new `system` method in the `Quasar` model to extract and format system information, including version handling.
- Updated the TTP template to adjust the grouping and ignore patterns for better parsing of system details, ensuring compatibility with the new method.
- Updated the `Node` class to use `response.raise_for_status()` for improved error handling, replacing the previous manual check for a 500 status code. This change simplifies the error management process when fetching node data.
- Modified the TTP template to use double backslashes for escaping whitespace in the `ignore` function for both `interfaces` and `bulkinterfaces` groups, ensuring proper parsing of configuration lines.
- Enhanced the `interfaces` method in the `Quasar` model to process bulk interfaces, returning a structured list of interface details.
- Updated the TTP template to reflect the change from `interfaces` to `bulkinterfaces` for better organization of interface configurations.
- Implemented a new `reload` method to fetch the reload status from the API.
- The method raises an error for unsuccessful responses and returns the status code on success.
- Implemented a private `_updater` method to fetch the next node's status.
- Added `last_status` and `last_check` properties to retrieve the latest node status and check time.
- Introduced a `refresh` property to update the node status and handle errors appropriately.
- Introduced a new `Quasar` model for parsing Quasar devices.
- Created a corresponding TTP template defining required and optional groups for configuration parsing.
- Added Apache License 2.0 to the project.
- Updated project description in pyproject.toml to "Oxidized API client".
- Specified the LICENSE file in pyproject.toml.
- Added classifiers for Python version and license type.
- Introduced a new `Eltex` model for parsing Eltex devices.
- Created a corresponding TTP template for Eltex devices, defining required and optional groups for configuration parsing.
- Removed the `interfaces` method from the `Qtech` model, simplifying the interface processing.
- Updated the TTP template to use `mask` instead of `netmask` for IP address configuration, enhancing clarity in CIDR notation.
- Introduced a new `Huawei` model
- Created a corresponding TTP template for Huawei devices.
- Updated the base template to correct HTML entity encoding for vendor placeholders.
- Simplified the description of the OxiAPI entry point.
- Improved formatting of parameter and property tables for better readability.
- Updated example outputs to reflect changes in node names and configurations.
- Implemented the `interfaces` method to process IP addresses and netmasks, adding a calculated mask to the output.
- Added the `vlans` method to handle VLAN data, supporting both individual and grouped VLAN IDs.
- Updated the QTECH TTP template to include a new version field and improved formatting for VLAN definitions.
- Introduced a new `Qtech` model with a corresponding TTP template for parsing QTECH devices.
- Removed commented-out methods in the `Mikrotik` model to improve code clarity and maintainability.
- Changed references from "Oxi API" to "Oxidized API" for accuracy.
- Added detailed installation instructions for using the Gitea Package Registry, including authentication steps and editable install options.
- Improved clarity in the quick start section with formatted output examples.
- Introduced a comprehensive README file detailing the installation, quick start guide, and API reference for the oxipy Python client.
- Added documentation on extending and overriding device models, including architecture, registration of new devices, and method overriding examples.
- Created a template guide for writing TTP templates, outlining structure, mandatory groups, and practical examples for new device support.
- Included a base template for device configuration parsing, enhancing usability for developers integrating with the Oxi API.
- 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.
- Introduced a new `ModelView` class to facilitate JSON serialization of model data, supporting both single models and lists.
- Updated `NodeConfig` methods to utilize `ModelView` for `vlans`, `interfaces`, and `system` properties, improving data handling consistency.
- Refactored the `json` method to ensure proper serialization of parsed data.
- Renamed `l3interfaces` to `interfaces` and `vlaninterfaces` to `system` in the `NodeConfig` class to align with updated data structure.
- This change enhances clarity and consistency in method naming, reflecting the underlying data model more accurately.
- Added a check in the BaseDevice class to raise a ValueError if the 'vlans' section is declared in the template but not present in the raw data returned by TTP.
- This enhancement improves data integrity by ensuring that optional groups are properly validated before processing.
- 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.
- 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.
- 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.
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.
"""