3 from TestMapper import TestMapper
5 # using mapper to do the reallocation job
7 def config (plcs, options):
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'
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'
20 print 'Unsupported personality %s'%options.personality
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 } )
30 'node': [ ('node1' , {'host_box': node_box1 } ),
31 ('node2' , {'host_box': node_box2 } ),
35 return TestMapper(plcs,options).map(mapper)