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 # liquid only used for the last f18 build
25 return [ 'buzzcocks', 'liquid' ]
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}'.format(i), # DNS name
38 'unused') # MAC address
39 for i in range(1,41) ]
41 def qemu_boxes_spec (self):
42 return [ # (hostname, how many qemus max in this box)
46 # these boxes are going on a well deserved retirement
47 # as of jan 2014 this is renumbered so that 1 is preferred
48 # speedball (1) - old school but robust and a big disk
49 # ('speedball', 2), # 4 cores, 4Gb, 840 Gb
50 # used to have kruder too, but it is broken/dead
52 # ('dorfmeister', 2), # 4 cores, 4Gb
53 # enfoui - L119 as it won't work well under the KVM in L102A
54 # use F10 to enter BIOS setup
55 # nodes spawned in this box won't get network connectivity
56 # ('enfoui', 4), # 4 cores, 8Gb
57 # estran (4) - big mem but small disk
58 # take it out because it takes much of the load and then gets full..
59 # ('estran', 2), # 4 cores, 8Gb
60 # lodos (5) - rather old/small
61 # ('lodos', 1), # 2 cores, 4Gb
63 # ('cyblok', 1), # 2 cores, 4Gb
65 # the nodes pool has a MAC address as user-data (3rd elt in tuple)
67 return [ ( 'vnode{:02d}'.format(i), # DNS name
68 '02:34:56:00:00:{:02d}'.format(i)) # MAC address
69 for i in range(1,21) ]
71 # local network settings
73 return 'pl.sophia.inria.fr'
75 def network_settings (self):
76 return { 'interface_fields:gateway': '138.96.112.250',
77 'route_fields:next_hop': '138.96.112.250',
78 'interface_fields:network': '138.96.112.0',
79 'interface_fields:broadcast': '138.96.119.255',
80 'interface_fields:netmask': '255.255.248.0',
81 'interface_fields:dns1': '138.96.112.1',
82 'interface_fields:dns2': '138.96.112.2',
83 'node_fields_nint:dns': '138.96.112.1,138.96.112.2',
84 'ipaddress_fields:netmask': '255.255.248.0',
87 # the hostname for the testmaster - in case we'd like to run this remotely
88 def testmaster (self):
91 local_substrate = OnelabSubstrate ()
93 if __name__ == '__main__':
94 local_substrate.main()