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