3 from TestMapper import TestMapper
4 from TestPool import TestPoolQemu
6 onelab_qemus_pool = [ ( 'testqemu%d.onelab.eu'%i, None, None) for i in range(1,4) ]
8 def config (plcs, options):
10 # all plcs on the same vserver box
11 plc_box ='testbox-plc.onelab.eu'
13 label=options.personality.replace("linux","")
15 # all qemus on a unique pool of 64bits boxes
17 qemu_pool = TestPoolQemu (onelab_qemus_pool,options)
18 for index in range(options.size):
21 ip_or_hostname=options.ips_qemu.pop()
22 (hostname,ip,unused)=qemu_pool.locate_entry(ip_or_hostname)
24 (hostname,ip,unused) = qemu_pool.next_free()
25 node_map += [ ('node%d'%index, {'host_box':hostname},) ]
27 mapper = {'plc': [ ('*' , {'hostname':plc_box,
28 'PLC_DB_HOST':plc_box,
29 'PLC_API_HOST':plc_box,
30 'PLC_BOOT_HOST':plc_box,
31 'PLC_WWW_HOST':plc_box,
32 'name':'%s-'+label } )
37 return TestMapper(plcs,options).map(mapper)