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 # velvet needs attention
24 # return [ 'liquid', 'reed', 'velvet' ]
25 return [ 'liquid', 'reed' ]
27 # the lxc-capable box for PLCs
28 def plc_lxc_boxes_spec (self):
30 # gotan looks in bad shape and I can't use its drac from the US
31 # ('gotan', 20), # how many plcs max in this box
37 return [ ( 'vplc%02d'%i, # DNS name
38 'unused') # MAC address
39 for i in range(1,41) ]
41 # as of jan 2014 this is renumbered so that 1 is preferred
42 def qemu_boxes_spec (self):
43 return [ # (hostname, how many qemus max in this box)
44 # speedball (1) - old school but robust and a big disk
45 ('speedball', 2), # 4 cores, 4Gb, 840 Gb
46 # used to have kruder too, but it is broken/dead
48 ('dorfmeister', 2), # 4 cores, 4Gb
49 # enfoui - L119 as it won't work well under the KVM in L102A
50 # use F10 to enter BIOS setup
51 # nodes spawned in this box won't get network connectivity
52 # ('enfoui', 4), # 4 cores, 8Gb
53 # estran (4) - big mem but small disk
54 ('estran', 3), # 4 cores, 8Gb
55 # lodos (5) - rather old/small
56 ('lodos', 1), # 2 cores, 4Gb
58 ('cyblok', 1), # 2 cores, 4Gb
61 # the nodes pool has a MAC address as user-data (3rd elt in tuple)
63 return [ ( 'vnode%02d'%i, # DNS name
64 '02:34:56:00:00:%02d'%i) # MAC address
65 for i in range(1,21) ]
67 # local network settings
69 return 'pl.sophia.inria.fr'
71 def network_settings (self):
72 return { 'interface_fields:gateway': '138.96.112.250',
73 'route_fields:next_hop': '138.96.112.250',
74 'interface_fields:network': '138.96.112.0',
75 'interface_fields:broadcast': '138.96.119.255',
76 'interface_fields:netmask': '255.255.248.0',
77 'interface_fields:dns1': '138.96.112.1',
78 'interface_fields:dns2': '138.96.112.2',
79 'node_fields_nint:dns': '138.96.112.1,138.96.112.2',
80 'ipaddress_fields:netmask': '255.255.248.0',
83 # the hostname for the testmaster - in case we'd like to run this remotely
84 def testmaster (self):
87 local_substrate = OnelabSubstrate ()
89 if __name__ == '__main__':
90 local_substrate.main()