From 6009f0bf9c29051d6ed6d5a34ce9f6254dc28bdb Mon Sep 17 00:00:00 2001 From: IluaAir Date: Wed, 15 Jul 2026 15:48:28 +0300 Subject: [PATCH 1/2] Add shutdown command to H3C interface template and update related configuration files - 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. --- oxi/interfaces/models/templates/h3c.ttp | 1 + tests/fixtures/h3c/config.conf | 1 + tests/fixtures/h3c/config.expected.json | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/oxi/interfaces/models/templates/h3c.ttp b/oxi/interfaces/models/templates/h3c.ttp index dcf1e2c..410ad69 100644 --- a/oxi/interfaces/models/templates/h3c.ttp +++ b/oxi/interfaces/models/templates/h3c.ttp @@ -23,6 +23,7 @@ default_system = { interface {{ interface }} description {{ description | ORPHRASE }} ip address {{ ip_address }} {{ mask | to_cidr }} + shutdown {{ shutdown | set(True) }} diff --git a/tests/fixtures/h3c/config.conf b/tests/fixtures/h3c/config.conf index 81eca56..58a5408 100644 --- a/tests/fixtures/h3c/config.conf +++ b/tests/fixtures/h3c/config.conf @@ -152,6 +152,7 @@ interface HundredGigE1/0/3 port link-type trunk undo port trunk permit vlan 1 port trunk permit vlan 221 1112 to 1116 1512 + shutdown storm-constrain broadcast pps 1100 1000 storm-constrain multicast pps 1100 1000 storm-constrain control shutdown diff --git a/tests/fixtures/h3c/config.expected.json b/tests/fixtures/h3c/config.expected.json index a3da1a5..22a2fde 100644 --- a/tests/fixtures/h3c/config.expected.json +++ b/tests/fixtures/h3c/config.expected.json @@ -63,7 +63,7 @@ }, { "interface": "HundredGigE1/0/3", - "shutdown": false, + "shutdown": true, "ip_address": null, "mask": null, "description": "HW_TEST_1" From 6846b30df07bd2379352304dcd10e15da164611a Mon Sep 17 00:00:00 2001 From: IluaAir Date: Wed, 15 Jul 2026 15:51:48 +0300 Subject: [PATCH 2/2] 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. --- oxi/interfaces/models/templates/qtech.ttp | 1 + tests/fixtures/qtech/config_1.expected.json | 2 +- tests/fixtures/qtech/config_2.expected.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oxi/interfaces/models/templates/qtech.ttp b/oxi/interfaces/models/templates/qtech.ttp index 1db628d..98385fe 100644 --- a/oxi/interfaces/models/templates/qtech.ttp +++ b/oxi/interfaces/models/templates/qtech.ttp @@ -29,6 +29,7 @@ default_system = { interface {{ interface | ORPHRASE }} + shutdown {{ shutdown | set(True) }} description {{ description | ORPHRASE }} ip address {{ ip_address }} {{ mask | to_cidr }} diff --git a/tests/fixtures/qtech/config_1.expected.json b/tests/fixtures/qtech/config_1.expected.json index afe08df..b45406a 100644 --- a/tests/fixtures/qtech/config_1.expected.json +++ b/tests/fixtures/qtech/config_1.expected.json @@ -7,7 +7,7 @@ "interfaces": [ { "interface": "GigaEthernet1/0/9", - "shutdown": false, + "shutdown": true, "ip_address": null, "mask": null, "description": "FREE" diff --git a/tests/fixtures/qtech/config_2.expected.json b/tests/fixtures/qtech/config_2.expected.json index 1a4e00f..63faa43 100644 --- a/tests/fixtures/qtech/config_2.expected.json +++ b/tests/fixtures/qtech/config_2.expected.json @@ -7,7 +7,7 @@ "interfaces": [ { "interface": "GigaEthernet1/0/9", - "shutdown": false, + "shutdown": true, "ip_address": null, "mask": null, "description": "FREE"