* new interactive option
[tests.git] / system / config_1testbox.py
1 import sys
2
3 from TestMapper import TestMapper
4
5 # using mapper to do the reallocation job
6
7 def config (plcs, options):
8
9     if options.arch == "i386":
10         testbox1 = 'testbox32.onelab.eu'
11         testbox2 = 'testbox32.onelab.eu'
12         target=testbox1
13     elif options.arch == "x86_64":
14 #        testbox1 = 'testbox64-1.onelab.eu'
15 #        testbox2 = 'testbox64-2.onelab.eu'
16         testbox1 = 'testbox64.onelab.eu'
17         testbox2 = 'estran.inria.fr'
18         target=testbox1
19     else:
20         print 'Unsupported arch %s'%options.arch
21         sys.exit(1)
22
23     mapper = {'plc': [ ('*' , {'hostname':target,
24                                'PLC_DB_HOST':target,
25                                'PLC_API_HOST':target,
26                                'PLC_BOOT_HOST':target,
27                                'PLC_WWW_HOST':target,
28                                'name':'%s-'+options.arch } ) 
29                        ],
30               'node': [ ('deferred01' , {'host_box': testbox1 } ),
31                         ('deferred02' , {'host_box': testbox2 } ),
32                         ],
33               }
34     
35     return TestMapper(plcs,options).map(mapper)