aa44e7d79de41cf5cb80d61413230e1944af65dd
[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         target = 'testbox32.onelab.eu'
11     elif options.arch == "x86_64":
12         target = 'testbox64.onelab.eu'
13     else:
14         print 'Unsupported arch %s'%options.arch
15         sys.exit(1)
16
17     mapper = {'plc': [ ('*' , {'hostname':target,
18                                'PLC_DB_HOST':target,
19                                'PLC_API_HOST':target,
20                                'PLC_BOOT_HOST':target,
21                                'PLC_WWW_HOST':target,
22                                'name':'%s-'+options.arch } ) ],
23               'node': [ ('*' , {'host_box': target } ) ],
24               }
25     
26     return TestMapper(plcs,options).map(mapper)