]> git.sesse.net Git - nms/commitdiff
Invert the numbering yet again.
authorSteinar H. Gunderson <sesse@samfundet.no>
Thu, 6 Apr 2006 14:30:17 +0000 (14:30 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Thu, 6 Apr 2006 14:30:17 +0000 (14:30 +0000)
zyxel/switchmap.py
zyxel/zyxelcommon.py

index 6d4be59b4105fe0282f1dcc33836607d77dd58fb..d1fba3667199f63feff199b06bc8667711df2a42 100644 (file)
@@ -3,20 +3,20 @@
 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 ""
index cefdacf61d8c05a80d39330ef42ce92e9eb3c921..1c1ca7878c07ea1b8de54a80cbac8ac278460134 100644 (file)
@@ -6,13 +6,13 @@ LOGHOST="194.0.255.20"
 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"