e102692f757a5cd99bf182f71d18e483ef46c4d3
[tests.git] / system / LocalSubstrate.inria.py
1 #!/usr/bin/python3 -u
2 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
3 # Copyright (C) 2010 INRIA 
4 #
5 # this is only an example file
6 # the actual file is installed in your testmaster box as /root/LocalTestResources.py
7
8
9 if __name__ == '__main__':
10    import sys, os.path
11    sys.path.append(os.path.expanduser("~/git-tests/system"))
12
13 from Substrate import Substrate
14
15 # domain name .pl.sophia.inria.fr is implicit on our network
16 class OnelabSubstrate (Substrate):
17
18    def test_box_spec (self):
19       return 'testmaster'
20
21    # the experimental lxc-based build box
22    def build_lxc_boxes_spec (self):
23 # liquid only used for the last f18 build      
24       return [ 'buzzcocks', 'liquid' ]
25
26    # the lxc-capable box for PLCs
27    def plc_lxc_boxes_spec (self):
28       return [ 
29 # gotan looks in bad shape and I can't use its drac from the US
30 #         ('gotan', 20),         # how many plcs max in this box 
31          ('deathvegas', 12),    
32          ]  
33
34    # vplc01 to 40
35    def vplc_ips (self):
36       return [  ( 'vplc{:02d}'.format(i),       # DNS name
37                   'unused')                     # MAC address 
38                 for i in range(1,41) ] 
39
40    def qemu_boxes_spec (self):
41       return [ # (hostname, how many qemus max in this box)
42          ('boxtops', 12),
43          ]
44
45 # these boxes are going on a well deserved retirement
46 # as of jan 2014 this is renumbered so that 1 is preferred
47 # speedball (1) - old school but robust and a big disk
48 #         ('speedball', 2), # 4 cores, 4Gb, 840 Gb
49 # used to have kruder too, but it is broken/dead
50 # dorfmeister (2)
51 #         ('dorfmeister', 2), # 4 cores, 4Gb
52 # enfoui - L119 as it won't work well under the KVM in L102A
53 # use F10 to enter BIOS setup
54 # nodes spawned in this box won't get network connectivity
55 #         ('enfoui', 4), # 4 cores, 8Gb
56 # estran (4) - big mem but small disk
57 # take it out because it takes much of the load and then gets full..
58 #         ('estran', 2), # 4 cores, 8Gb
59 # lodos (5) - rather old/small
60 #         ('lodos', 1), # 2 cores, 4Gb
61 # cyblok (6)        
62 #         ('cyblok', 1), # 2 cores, 4Gb
63
64    # the nodes pool has a MAC address as user-data (3rd elt in tuple)
65    def vnode_ips (self):
66       return [ ( 'vnode{:02d}'.format(i),            # DNS name               
67                  '02:34:56:00:00:{:02d}'.format(i))  # MAC address
68                for i in range(1,21) ] 
69    
70    # local network settings
71    def domain (self):
72       return 'pl.sophia.inria.fr'
73
74    def network_settings (self):
75       return { 'interface_fields:gateway':      '138.96.112.250',
76                'route_fields:next_hop':         '138.96.112.250',
77                'interface_fields:network':      '138.96.112.0',
78                'interface_fields:broadcast':    '138.96.119.255',
79                'interface_fields:netmask':      '255.255.248.0',
80                'interface_fields:dns1':         '138.96.112.1',
81                'interface_fields:dns2':         '138.96.112.2',
82                'node_fields_nint:dns':          '138.96.112.1,138.96.112.2',
83                'ipaddress_fields:netmask':      '255.255.248.0',
84                }
85
86 # the hostname for the testmaster - in case we'd like to run this remotely
87    def testmaster (self): 
88       return 'testmaster'
89
90 local_substrate = OnelabSubstrate ()
91
92 if __name__ == '__main__':
93    local_substrate.main()