- Included the `shutdown` command in the H3C interface template to reflect the new interface state management. - Updated the `config.conf` file to include the `shutdown` command for the `HundredGigE1/0/3` interface. - Modified the expected output JSON to set the `shutdown` attribute to true, ensuring accurate testing and validation of interface configurations.
36 lines
901 B
Plaintext
36 lines
901 B
Plaintext
<doc>
|
|
H3C configuration parser.
|
|
|
|
The system group reads boot image version and board model data. The interfaces
|
|
group parses interface IP settings. The vlans groups parse both named VLANs and
|
|
range-style VLAN declarations.
|
|
</doc>
|
|
<vars>
|
|
default_system = {
|
|
"model": "",
|
|
"serial_number": "",
|
|
"version": ""
|
|
}
|
|
</vars>
|
|
|
|
<group name="system" default="default_system">
|
|
# Boot image version: {{ version }}, Release {{ release }}
|
|
# {{ mpu }} Slot {{ slot }}:
|
|
# BOARD TYPE: {{ model }}
|
|
</group>
|
|
|
|
<group name="interfaces">
|
|
interface {{ interface }}
|
|
description {{ description | ORPHRASE }}
|
|
ip address {{ ip_address }} {{ mask | to_cidr }}
|
|
shutdown {{ shutdown | set(True) }}
|
|
</group>
|
|
|
|
<group name="vlans">
|
|
vlan {{ vlan_id }}
|
|
name {{ name }}
|
|
description {{ description }}
|
|
</group>
|
|
<group name="vlans">
|
|
vlan {{ vlans_id | ORPHRASE | contains(" to ") | unrange(" to ", ",") | split(",") }}
|
|
</group> |