adding TestScripts class
[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         'tests_path': '/usr/share/tests/',      
17         'tests': []                          # which test to run. None or empty list means run all
18         }
19
20      def __init__(self, fields = {}):
21
22         dict.__init__(self, self.fields)
23         
24         self.update(fields)
25
26 class Slices(Table):
27     def __init__(self, slices):
28         slicelist = [Slice(slice) for slice in slices]
29         Table.__init__(self, slicelist)