Files
oxipy/oxi/interfaces/models/templates/eltex.ttp
IluaAir a617bd6ecd Add description fields to Eltex interface template
- Updated the Eltex TTP template to include 'name' and 'description' fields for interfaces, enhancing clarity and detail in the generated configurations.
2026-06-07 08:47:51 +03:00

40 lines
1.0 KiB
Plaintext

<doc>
Eltex configuration parser.
The system group reads software version data and the serial group extracts
serial numbers from the unit table. The interfaces group parses interface IP
settings. The vlans group supports named VLAN interfaces and compressed VLAN
lists.
</doc>
<vars>
default_system = {
"model": "",
"serial_number": "",
"version": ""
}
</vars>
<group name="system" default="default_system">
Active-image: {{ ignore }} {{ _start_ }}
! Version: {{ version }}
</group>
<group name="serial" method="table">
! Unit MAC address Hardware version Serial number
! {{ unit | exclude("-") }} {{ mac_address }} {{ hardware_version }} {{ serial_number }}
</group>
<group name="interfaces">
interface {{ interface | ORPHRASE }}
ip address {{ ip_address }} {{ mask | to_cidr }}
name {{ description }}
description {{ description }}
</group>
<group name="vlans">
interface vlan {{ vlan_id | _start_ }}
name {{ name }}
vlan {{ _db_ | _start_ }}
vlan {{ vlan_ids | joinmatches(',') | unrange("-", ",") | split(",")}}
</group>