from zyxelcommon import *
print " ",
-for sw in range(6,0,-1):
+for sw in range(1,7):
print "%7u " % sw,
- if sw == 4:
+ if sw == 3:
print " ",
print ""
for row in range(1,75,2):
print "\e[37m%2u: " % row,
- for sw in range(6,0,-1):
- if (row <= 3 and sw >= 4) or (row >= 69 and (sw == 1 or sw == 6)):
+ for sw in range(1,7):
+ if (row <= 3 and sw <= 3) or (row >= 69 and (sw == 1 or sw == 6)):
print "%-16s " % "",
else:
print retColor((row,sw)), "%-15s " % retIP((row,sw)),
- if sw == 4:
+ if sw == 3:
print " ",
print ""
def retSubnet(sw):
(rad,num) = sw
drad = (rad + 1) / 2
- if drad <= 7 or (drad == 8 and (num >= 4 or num == 1)):
+ if drad <= 7 or (drad == 8 and (num <= 3 or num == 6)):
return "241"
- if drad <= 13 or (drad == 14 and num != 3) or (drad == 15 and num >= 4):
+ if drad <= 13 or (drad == 14 and num != 4) or (drad == 15 and num <= 3):
return "242"
- if drad <= 22 or (drad == 23 and num <= 3) or (drad == 24 and num == 3):
+ if drad <= 22 or (drad == 23 and num >= 4) or (drad == 24 and num == 4):
return "243"
- if drad <= 29 or (drad == 30 and (num == 2 or num == 3)):
+ if drad <= 29 or (drad == 30 and (num == 4 or num == 5)):
return "244"
return "245"