Refactor Qtech model to utilize centralized VLAN range expansion utility

- Replaced the internal `_expand_vlan_range` function in the `Qtech` class with the new `expand_vlan_range` utility from `utils.py` for improved code maintainability.
- Added new configuration files `config_1.conf` and `config_2.conf` for Qtech devices to facilitate testing.
- Introduced expected output JSON files `config_1.expected.json` and `config_2.expected.json` to validate the parsing of Qtech configurations against expected results.
This commit is contained in:
IluaAir
2026-06-07 08:47:08 +03:00
parent 1bc01c9c1b
commit 0ef5e7798a
5 changed files with 450 additions and 41 deletions

42
tests/fixtures/qtech/config_1.conf vendored Normal file
View File

@@ -0,0 +1,42 @@
! QTECH LLC Internetwork Operating System Software
! QSW-8330-40T-DC Series Software, Version 2.2.0C Build 96279, RELEASE SOFTWARE
! ROM: System Bootstrap, Version 0.4.7,hardware version:A
! Serial num:6060606060606060, ID num:555555555555
! System image file is "Switch.bin"
! QTECH LLC QSW-8330-40T-DC RISC
! 524288K bytes of memory,16384K bytes of flash
! Base ethernet MAC Address: 08:c6:b3:08:cf:ff
! snmp info:
! vend_ID:27514 product_ID:404 system_ID:1.3.6.1.4.1.27514
interface GigaEthernet1/0/9
shutdown
description FREE
switchport pvid 102
storm-control broadcast threshold 15
storm-control broadcast action shutdown
storm-control broadcast auto_resume 60s
storm-control multicast threshold 10
storm-control multicast action shutdown
storm-control multicast auto_resume 60s
qos policy IPP3 ingress
!
interface VLAN1
ip address 192.168.0.1 255.255.0.0
ip mtu 1500
no ip directed-broadcast
!
interface VLAN1002
description test-1002
ip address 13.36.8.1 255.255.255.0
ip mtu 1500
no ip directed-broadcast
!
vlan 772
name test
!
vlan 888
name test_super
!
vlan 1,7,14-15,44,101-102,115,117-124,130-136,139,167,200-205,772
,1607
vlan 888,2016,2085-2088