3 from zyxelcommon import *
4 distro_num_switches = [ 0, 0, 0, 0, 0 ];
13 for row in range(1,75,2):
14 print "
\e[37;0m%2u: " % row,
16 if (row <= 3 and sw <= 3) or (row >= 69 and (sw == 1 or sw == 6)):
20 distro = int(retSubnet((row,sw))) - 241
21 vlan = (distro * 100) + (distro_num_switches[distro] / 5) + 301
22 distro_num_switches[distro] = distro_num_switches[distro] + 1
24 text = "%s/%u" % (ip, vlan)
26 padding1 = "".join(["="] * ((21-len(text))/2))
27 padding2 = "".join(["="] * ((22-len(text))/2))
28 print "".join(("
\e[30;1m", padding1, retColor((row,sw)), text, "
\e[30;1m", padding2)),
33 if row in (17, 33, 49, 67):