2 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
3 # Copyright (C) 2010 INRIA
5 # this is only an example file
6 # the actual file is installed in your testmaster box as /root/LocalTestResources.py
9 if __name__ == '__main__':
11 sys.path.append(os.path.expanduser("~/git-tests/system"))
13 from Substrate import Substrate
15 # domain name .pl.sophia.inria.fr is implicit on our network
16 class OnelabSubstrate (Substrate):
18 def test_box_spec (self):
21 # the build boxes we use
22 def build_boxes_spec (self):
23 return [ 'liquid', 'reed', 'velvet', 'gorillaz' ]
25 # the vs-capable box for PLCs
26 def plc_vs_boxes_spec (self):
27 return [ ('warhol', 35), # how many plcs max in this box
30 # the lxc-capable box for PLCs
31 def plc_lxc_boxes_spec (self):
32 return [ ('gotan', 35), # how many plcs max in this box
38 return [ ( 'vplc%02d'%i, # DNS name
39 'unused') # MAC address
40 for i in range(1,41) ]
42 def qemu_boxes_spec (self):
43 return [ # how many qemus max in this box
44 ('kvm64-1', 3), # 4 cores, 4Gb
45 ('kvm64-2', 3), # 4 cores, 4Gb
46 ('kvm64-3', 2), # 2 cores, 4Gb
47 ('kvm64-4', 1), # 4 cores, 8Gb
48 ('kvm64-5', 1), # 2 cores, 4Gb
49 ('kvm64-6', 2), # 2 cores, 4Gb
52 # the nodes pool has a MAC address as user-data (3rd elt in tuple)
54 return [ ( 'vnode%02d'%i, # DNS name
55 '02:34:56:00:00:%02d'%i) # MAC address
56 for i in range(1,21) ]
58 # local network settings
60 return 'pl.sophia.inria.fr'
62 def network_settings (self):
63 return { 'interface_fields:gateway': '138.96.112.250',
64 'route_fields:next_hop': '138.96.112.250',
65 'interface_fields:network': '138.96.112.0',
66 'interface_fields:broadcast': '138.96.119.255',
67 'interface_fields:netmask': '255.255.248.0',
68 'interface_fields:dns1': '138.96.112.1',
69 'interface_fields:dns2': '138.96.112.2',
70 'node_fields_nint:dns': '138.96.112.1,138.96.112.2',
71 'ipaddress_fields:netmask': '255.255.248.0',
74 # the hostname for the testmaster - in case we'd like to run this remotely
75 def testmaster (self):
78 local_substrate = OnelabSubstrate ()
80 if __name__ == '__main__':
81 local_substrate.main()