3 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
4 # Copyright (C) 2015 INRIA
6 # this is only an example file
7 # the actual file is installed in your testmaster box as /root/LocalTestResources.py
10 if __name__ == '__main__':
12 sys.path.append(os.path.expanduser("~/git-tests/system"))
14 from Substrate import Substrate
16 # domain name .pl.sophia.inria.fr is implicit on our network
17 class OnelabSubstrate (Substrate):
19 def test_box_spec (self):
22 # the experimental lxc-based build box
23 def build_lxc_boxes_spec (self):
24 return [ 'buzzcocks' ]
26 # the lxc-capable box for PLCs
27 def plc_lxc_boxes_spec (self):
28 # we now use the same box as for builds
29 return [ ('buzzcocks', 12), ]
31 def qemu_boxes_spec (self):
32 # ditto, a single big box now is enough
33 return [ ('boxtops', 64), ]
38 return [ ( 'vplc{:02d}'.format(i), # DNS name
39 'unused') # MAC address
40 for i in range(1,41) ]
42 # the nodes pool has a MAC address as user-data (3rd elt in tuple)
44 return [ ( 'vnode{:02d}'.format(i), # DNS name
45 '02:34:56:00:00:{:02d}'.format(i)) # MAC address
46 for i in range(1,21) ]
48 # local network settings
50 return 'pl.sophia.inria.fr'
52 def network_settings (self):
53 return { 'interface_fields:gateway': '138.96.112.250',
54 'route_fields:next_hop': '138.96.112.250',
55 'interface_fields:network': '138.96.112.0',
56 'interface_fields:broadcast': '138.96.119.255',
57 'interface_fields:netmask': '255.255.248.0',
58 'interface_fields:dns1': '138.96.112.1',
59 'interface_fields:dns2': '138.96.112.2',
60 'node_fields_nint:dns': '138.96.112.1,138.96.112.2',
61 'ipaddress_fields:netmask': '255.255.248.0',
64 # the hostname for the testmaster that orchestrates the whole business
65 def testmaster (self):
68 local_substrate = OnelabSubstrate ()
70 if __name__ == '__main__':
71 local_substrate.main()