* new interactive option
[tests.git] / system / config_1vservers.py
index bb01ebd..6e63fe3 100644 (file)
@@ -3,8 +3,11 @@ import os.path
 from TestPool import TestPool
 
 # the pool of IP addresses available - from 01 to 09
+#onelab_plcs_pool = [ 
+#    ( 'vplc%02d.inria.fr'%i, '138.96.250.13%d'%i, '02:34:56:00:ee:%02d'%i) for i in range(1,10) ]
+# vplc09 is reserved for a fixed myplc - from 01 to 08
 onelab_plcs_pool = [ 
-    ( 'vplc%02d.inria.fr'%i, '138.96.250.13%d'%i, '02:34:56:00:ee:%02d'%i) for i in range(1,10) ]
+    ( 'vplc%02d.inria.fr'%i, '138.96.255.%d'%(200+i), '02:34:56:00:ee:%02d'%i) for i in range(1,21) ]
 
 def config (plcs,options):
     
@@ -12,16 +15,16 @@ def config (plcs,options):
 
     test_pool = TestPool (onelab_plcs_pool,options)
 
-    if len(options.ips) != 0:
-        utils.header('Using user-provided IPS:\nips=%r'%options.ips)
-        options.ips.reverse()
+    if len(options.ips_plc) != 0:
+        utils.header('Using user-provided IPS:\nips_plc=%r'%options.ips_plc)
+        options.ips_plc.reverse()
 
     plc_counter=0
     for plc in plcs:
         try:
-            if len(options.ips) != 0:
-                ip=options.ips[0]
-                options.ips=options.ips[1:]
+            if len(options.ips_plc) != 0:
+                ip=options.ips_plc[0]
+                options.ips_plc=options.ips_plc[1:]
                 (hostname,ip,mac)=test_pool.locate(ip)
                 utils.header("Using user-provided %s %s for plc %s"%(
                         hostname,ip,plc['name']))
@@ -33,7 +36,6 @@ def config (plcs,options):
             ### rewrite fields in plc
             # compute a helpful vserver name - remove domain in hostname
             simplehostname=hostname.split('.')[0]
-            # myplc rpm basename, without .rpm
             vservername = options.buildname
             if len(plcs) == 1 :
                 vservername = "%s-%s" % (vservername,simplehostname)