2472712e74caf17b7facb2d34079bbe1094d8575
[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         plc_box   ='speedball.inria.fr'
11         node_box1 = 'testbox64_1.onelab.eu'
12         node_box2 = 'testbox64_2.onelab.eu'
13     elif options.arch == "x86_64":
14         plc_box =   'speedball.inria.fr'
15         node_box1 = 'testbox64_1.onelab.eu'
16         node_box2 = 'testbox64_2.onelab.eu'
17     else:
18         print 'Unsupported arch %s'%options.arch
19         sys.exit(1)
20
21     mapper = {'plc': [ ('*' , {'hostname':plc_box,
22                                'PLC_DB_HOST':plc_box,
23                                'PLC_API_HOST':plc_box,
24                                'PLC_BOOT_HOST':plc_box,
25                                'PLC_WWW_HOST':plc_box,
26                                'name':'%s-'+options.arch } ) 
27                        ],
28               'node': [ ('deferred01' , {'host_box': node_box1 } ),
29                         ('deferred02' , {'host_box': node_box2 } ),
30                         ],
31               }
32     
33     return TestMapper(plcs,options).map(mapper)