Files
IluaAir 6846b30df0 Add shutdown command to Qtech interface template and update expected configuration files
- Included the `shutdown` command in the Qtech interface template to manage interface states.
- Updated expected output JSON files to set the `shutdown` attribute to true for accurate testing and validation of interface configurations.
2026-07-15 15:51:48 +03:00

43 lines
1.4 KiB
Plaintext

<doc>
Qtech switch configuration parser.
The system group reads the model, serial number, and build number. For Qtech,
system.version intentionally stores the build number from lines like
`Version 2.2.0C Build 96279`.
The interfaces group parses CLI interface blocks and converts dotted decimal
masks to prefix lengths. The vlans group supports named VLANs, comma-separated
VLAN lists, ranges, and continuation lines.
</doc>
<vars>
default_system = {
"model": "",
"serial_number": "",
"version": ""
}
</vars>
<group name="system" default="default_system">
! {{ model | ORPHRASE | _start_ }} Series Software, Version {{ ignore }} Build {{ version | strip(",") }}{{ ignore('.*') }}
! Serial num:{{ serial_number | strip(",") }}{{ ignore('.*') }}
! System description : {{ description | PHRASE | _start_ }}({{ model }}) By {{ vendor }}
! System description : {{ description | PHRASE | _start_ }}({{ model }})
! System software version : {{ description | PHRASE }}, Release({{ version }})
! System serial number : {{ serial_number }}
</group>
<group name="interfaces">
interface {{ interface | ORPHRASE }}
shutdown {{ shutdown | set(True) }}
description {{ description | ORPHRASE }}
ip address {{ ip_address }} {{ mask | to_cidr }}
</group>
<group name="vlans">
vlan {{ vlan_ids | contains(",", "-") | unrange("-", ",") }}
,{{ vlan_tail | unrange("-", ",") }}
vlan {{ vlan_id | _start_ }}
name {{ name | ORPHRASE }}
</group>