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 experimental lxc-based build box
22 def build_lxc_boxes_spec (self):
23 return [ 'liquid', 'reed', 'velvet' ]
25 # the lxc-capable box for PLCs
26 def plc_lxc_boxes_spec (self):
28 ('gotan', 10), # how many plcs max in this box
34 return [ ( 'vplc%02d'%i, # DNS name
35 'unused') # MAC address
36 for i in range(1,41) ]
38 # as of jan 2014 this is renumbered so that 1 is preferred
39 def qemu_boxes_spec (self):
40 return [ # (hostname, how many qemus max in this box)
41 # speedball - old school but robust and a big disk
42 ('kvm64-1', 3), # 4 cores, 4Gb, 840 Gb
43 # used to have kruder too, but it is broken/dead
45 ('kvm64-2', 3), # 4 cores, 4Gb
46 # enfoui - can't seem to enter BIOS on that one
47 # won't reboot - needs to be fixed
48 # ('kvm64-3', 4), # 4 cores, 8Gb
49 # estran - big mem but small disk
50 ('kvm64-4', 2), # 4 cores, 8Gb
51 # lodos - rather old/small
52 ('kvm64-5', 1), # 2 cores, 4Gb
54 ('kvm64-6', 1), # 2 cores, 4Gb
57 # the nodes pool has a MAC address as user-data (3rd elt in tuple)
59 return [ ( 'vnode%02d'%i, # DNS name
60 '02:34:56:00:00:%02d'%i) # MAC address
61 for i in range(1,21) ]
63 # local network settings
65 return 'pl.sophia.inria.fr'
67 def network_settings (self):
68 return { 'interface_fields:gateway': '138.96.112.250',
69 'route_fields:next_hop': '138.96.112.250',
70 'interface_fields:network': '138.96.112.0',
71 'interface_fields:broadcast': '138.96.119.255',
72 'interface_fields:netmask': '255.255.248.0',
73 'interface_fields:dns1': '138.96.112.1',
74 'interface_fields:dns2': '138.96.112.2',
75 'node_fields_nint:dns': '138.96.112.1,138.96.112.2',
76 'ipaddress_fields:netmask': '255.255.248.0',
79 # the hostname for the testmaster - in case we'd like to run this remotely
80 def testmaster (self):
83 local_substrate = OnelabSubstrate ()
85 if __name__ == '__main__':
86 local_substrate.main()