Files
oxipy/oxi/interfaces/models/templates/huawei.ttp
IluaAir c4f20d3241 Update Huawei TTP template to include model information in version display
- Modified the Huawei TTP template to append the model identifier to the version string, enhancing the clarity of system information output for diagnostics.
2026-06-06 11:13:50 +03:00

29 lines
787 B
Plaintext

<doc>
Huawei VRP configuration parser.
The system group reads VRP version and slot ESN data. The interfaces group
parses interface blocks and converts dotted decimal masks to prefix lengths.
The vlans group parses `vlan batch` declarations and emits VLAN IDs.
</doc>
<vars>
default_system = {
"model": "",
"serial_number": "",
"version": ""
}
</vars>
<group name="system" default="default_system">
# VRP (R) software, Version {{ version }} ({{ model }} {{ _line_ }}
# ESN of slot {{ slot_number }}: {{ serial_number }}
</group>
<group name="interfaces">
interface {{ interface }}
description {{ description }}
ip address {{ ip_address }} {{ mask | to_cidr }}
</group>
<group name="vlans">
vlan batch {{ vlan_ids | ORPHRASE | unrange(" to ", " ") | split(" ")}}
</group>