Add shutdown command to Huawei interface template and update configuration files
- Included the `shutdown` command in the Huawei interface template to manage interface states. - Added a new interface configuration in `config.conf` with the `shutdown` command. - Updated the expected output JSON to reflect the new interface and its shutdown state for accurate testing and validation of configurations.
This commit is contained in:
@@ -21,6 +21,7 @@ default_system = {
|
||||
<group name="interfaces">
|
||||
interface {{ interface }}
|
||||
description {{ description | ORPHRASE }}
|
||||
shutdown {{ shutdown | set(True) }}
|
||||
ip address {{ ip_address }} {{ mask | to_cidr }}
|
||||
</group>
|
||||
<group name="vlans">
|
||||
|
||||
11
tests/fixtures/huawei/config.conf
vendored
11
tests/fixtures/huawei/config.conf
vendored
@@ -30,6 +30,17 @@ interface GigabitEthernet0/0/33
|
||||
storm-control multicast min-rate 1000 max-rate 2000
|
||||
storm-control action error-down
|
||||
#
|
||||
interface GigabitEthernet1/0/43
|
||||
description FREE
|
||||
shutdown
|
||||
port link-type access
|
||||
port default vlan 102
|
||||
loopback-detect enable
|
||||
stp disable
|
||||
storm-control broadcast min-rate 1500 max-rate 2500
|
||||
storm-control multicast min-rate 1000 max-rate 2000
|
||||
storm-control action error-down
|
||||
#
|
||||
interface Vlanif120
|
||||
description SSH
|
||||
ip address 10.26.196.254 255.255.255.0
|
||||
|
||||
7
tests/fixtures/huawei/config.expected.json
vendored
7
tests/fixtures/huawei/config.expected.json
vendored
@@ -12,6 +12,13 @@
|
||||
"mask": null,
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"interface": "GigabitEthernet1/0/43",
|
||||
"shutdown": true,
|
||||
"ip_address": null,
|
||||
"mask": null,
|
||||
"description": "FREE"
|
||||
},
|
||||
{
|
||||
"interface": "Vlanif120",
|
||||
"shutdown": false,
|
||||
|
||||
Reference in New Issue
Block a user