Files
oxipy/oxi/interfaces/models/templates/keenetic.ttp
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

29 lines
728 B
Plaintext

<doc>
</doc>
<vars>
default_system = {
"model": "",
"serial_number": ""
}
default_interfaces = {}
</vars>
<group name="system" default="default_system">
! release: {{ version }}
! model: {{ model | ORPHRASE }}
! hw_version: {{ serial_number }}
</group>
<group name="interfaces">
interface {{ name | _start_ | exclude("Vlan") }}
rename {{ rename }}
description {{ description | ORPHRASE }}
ip address {{ ip_address }} {{ netmask }}
{{ shutdown | re("up") | replace("up","False") | strip('"') }}
{{ shutdown | re("down") | replace("down","True") | strip('"') }}
</group>
<group name="vlans">
interface {{ ignore }}/Vlan{{ vlan_id }}
description {{ description | ORPHRASE | strip('"') }}
</group>