Refactor Mikrotik model and update template structure
- Changed the parsing method in `NodeConfig` to use `parse()` instead of `parse_config()`. - Updated the template loading path in `BaseDevice` to reflect the new directory structure. - Enhanced the `Mikrotik` class with new methods for `system`, `interfaces`, and `vlans`, including debug print statements. - Expanded the TTP template for Mikrotik to include structured variable definitions and groups for system, interfaces, and VLANs.
This commit is contained in:
@@ -16,7 +16,7 @@ class NodeConfig:
|
||||
self._device: type[BaseDevice] = device_registry.get(self._model.lower())
|
||||
if self._device is None:
|
||||
raise ValueError(f"Device model '{self._model}' not found in registry")
|
||||
self._parsed_data = self._device(self.text).parse_config()
|
||||
self._parsed_data = self._device(self.text).parse()
|
||||
|
||||
@cached_property
|
||||
def _response(self):
|
||||
|
||||
Reference in New Issue
Block a user