- 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.
31 lines
532 B
Plaintext
31 lines
532 B
Plaintext
<doc>
|
|
</doc>
|
|
<template>
|
|
<vars>
|
|
default_system = {
|
|
"model": "",
|
|
"serial_number": ""
|
|
}
|
|
default_vlans = {
|
|
"id": "",
|
|
"name": ""
|
|
}
|
|
</vars>
|
|
|
|
|
|
<group name="system" default="default_system">
|
|
# version: {{ version }} {{ ignore }}
|
|
# model = {{ model }}
|
|
# serial number = {{ serial_number }}
|
|
</group>
|
|
|
|
<group name="interfaces">
|
|
/ip address
|
|
add address={{ address }} interface={{ interface }} network={{ network }}
|
|
</group>
|
|
|
|
<group name="vlans" default="default_vlans">
|
|
/vlans add {{ id }} name= {{ name }}
|
|
</group>
|
|
|
|
</template> |