Refactor Eltex model to use centralized VLAN range expansion utility
- Replaced the internal `_expand_vlan_range` function in the `Eltex` class with the new `expand_vlan_range` utility from `utils.py` for improved code maintainability. - Added a new configuration file `config.conf` for Eltex devices to facilitate testing. - Introduced an expected output JSON file `config.expected.json` to validate the parsing of Eltex configurations against expected results.
This commit is contained in:
55
tests/fixtures/eltex/config.conf
vendored
Normal file
55
tests/fixtures/eltex/config.conf
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
!
|
||||
Active-image: flash://system/images/mes3300-669-3R3.ros
|
||||
! Version: 6.6.9.3
|
||||
! Commit: 3a5c2e39
|
||||
! Build: 3 (master)
|
||||
! MD5 Digest: 7bc289cc18be560954bd5cb0afd9b2d5
|
||||
! Date: 22-Sep-2025
|
||||
! Time: 12:38:20
|
||||
! Inactive-image: flash://system/images/_image1.bin
|
||||
! Version: 6.6.2
|
||||
! Commit: 3ebc7503
|
||||
! Build: 5 (master)
|
||||
! MD5 Digest: a3f15a788c97c71e07e90d84c0ff3b12
|
||||
! Date: 20-Nov-2023
|
||||
! Time: 16:39:20
|
||||
!
|
||||
! Unit MAC address Hardware version Serial number
|
||||
! ---- ----------------- ---------------- -------------
|
||||
! 1 90:54:b7:6b:9d:40 01.01.01 ESG7007778
|
||||
! 2 90:54:b7:6b:bb:80 01.01.01 ESG7007777
|
||||
!
|
||||
!
|
||||
!
|
||||
interface TenGigabitEthernet1/0/2
|
||||
shutdown
|
||||
description FREE
|
||||
storm-control broadcast pps 3000
|
||||
storm-control multicast pps 3000
|
||||
exit
|
||||
!
|
||||
interface TenGigabitEthernet1/0/11
|
||||
shutdown
|
||||
description FREE
|
||||
storm-control broadcast pps 3000
|
||||
storm-control multicast pps 3000
|
||||
exit
|
||||
!
|
||||
interface vlan 1700
|
||||
name sw-test_HW
|
||||
ip address 13.36.8.1 255.255.255.0
|
||||
exit
|
||||
!
|
||||
vlan database
|
||||
vlan 114-115,120,130,414,610,999-1000,1701-1703,1705,1801,2001,2011
|
||||
vlan 2021-2022,3157-3158,3333-3334
|
||||
exit
|
||||
!
|
||||
interface vlan 666
|
||||
name test
|
||||
exit
|
||||
!
|
||||
interface vlan 777
|
||||
name test2
|
||||
exit
|
||||
!
|
||||
Reference in New Issue
Block a user