Files
oxipy/oxi/interfaces/models/templates/huawei.ttp
IluaAir 8edd1a296c Add H3C device support with configuration and expected output files
- Introduced support for H3C devices by adding a new configuration file `config.conf` containing interface and VLAN settings.
- Created an expected output JSON file `config.expected.json` to validate the parsing of H3C configurations.
- Updated the test model cases to include H3C for comprehensive testing of device parsing functionality.
2026-06-11 16:16:14 +03:00

29 lines
798 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 | ORPHRASE }}
ip address {{ ip_address }} {{ mask | to_cidr }}
</group>
<group name="vlans">
vlan batch {{ vlan_ids | ORPHRASE | unrange(" to ", " ") | split(" ")}}
</group>