run lxc-enter-namespace with --noseclabel
[tests.git] / qaapi / qa / Slices.py
1 import os
2 from Remote import Remote
3 from Table import Table
4
5 class Slice(dict, Remote):
6
7     fields = {
8         'plcs': ['TestPLC'],                 # which plc does this slice belong to      
9         'name': None,
10         'instantiation': 'plc-instantiated',
11         'max_nodes': 1000,
12         'description': 'blank',
13         'url': None,
14         'key': None,                         # any valid ssh key
15         'nodes': [],                         # nodes where this slice runs
16         'persons': [],                       # persons on this slice
17         'tests_path': '/usr/share/tests/',      
18         'tests': [],                          # which test to run. None or empty list means run all
19         }
20
21     def __init__(self, config, fields = {}):
22
23         dict.__init__(self, self.fields)
24         self.config = config
25         self.update(fields)
26
27         
28                 
29 class Slices(Table):
30     def __init__(self, config, slices):
31         slicelist = [Slice(config, slice) for slice in slices]
32         Table.__init__(self, slicelist)
33         self.config = config