From b56ea9e0b1e300e7b54c4e3102354b8b64cb0ed9 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 10 Apr 2006 19:04:00 +0000 Subject: [PATCH] Switch to a predefined starting VLAN for each distro. --- zyxel/switchmap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zyxel/switchmap.py b/zyxel/switchmap.py index 6a402cf..721e0f6 100755 --- a/zyxel/switchmap.py +++ b/zyxel/switchmap.py @@ -2,6 +2,7 @@ from zyxelcommon import * distro_num_switches = [ 0, 0, 0, 0, 0, 0, 0, 0 ]; +distro_vlan_start = [ 301, 405, 509, 617, 727, 835, 938, 1041 ]; vlans = {} @@ -20,7 +21,7 @@ for row in range(1,73,2): else: ip = retIP((row,sw)) distro = int(retSubnet((row,sw))) - 241 - vlan = (distro * 100) + (distro_num_switches[distro] / 5) + 301 + vlan = (distro_num_switches[distro] / 5) + distro_vlan_start[distro] distro_num_switches[distro] = distro_num_switches[distro] + 1 text = "%s/%u" % (ip, vlan) -- 2.39.2