renumberd kvm64 boxes
[tests.git] / system / LocalSubstrate.inria.py
1 #!/usr/bin/python -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 build boxes we use 
22    def build_vs_boxes_spec (self):
23       return []
24
25    # the experimental lxc-based build box
26    def build_lxc_boxes_spec (self):
27       return [ 'liquid', 'reed', 'velvet' ]
28
29    # the vs-capable box for PLCs
30    def plc_vs_boxes_spec (self):
31       return [ ]
32
33    # the lxc-capable box for PLCs
34    def plc_lxc_boxes_spec (self):
35       return [ 
36          ('gotan', 10),         # how many plcs max in this box 
37          ('deathvegas', 10),    
38          ]  
39
40    # vplc01 to 40
41    def vplc_ips (self):
42       return [  ( 'vplc%02d'%i,                 # DNS name
43                   'unused')                     # MAC address 
44                 for i in range(1,41) ] 
45
46 # as of jan 2014 this is renumbered so that 1 is preferred
47    def qemu_boxes_spec (self):
48       return [ # how many qemus max in this box
49 # enfoui - can't seem to enter BIOS on that one
50          ('kvm64-1', 4), # 4 cores, 8Gb
51 # used to have kruder too, but it is broken/dead
52 # dorfmeister
53          ('kvm64-2', 3), # 4 cores, 4Gb
54 # estran - big meme but small disk
55          ('kvm64-3', 2), # 4 cores, 8Gb
56 # lodos - rather old/small
57          ('kvm64-4', 1), # 2 cores, 4Gb
58 # cyblok         
59          ('kvm64-5', 1), # 2 cores, 4Gb
60 # we also have speedball installed but it is reserved for manual trials of libvirt/qemu
61 #         ('kvm64-6', 3), # 4 cores, 4Gb
62          ]
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'%i,                 # DNS name               
67                  '02:34:56:00:00:%02d'%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()