X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=qaapi%2Fqa%2FSlices.py;h=af343f609e188e91db8a774aff09ecc383c46939;hb=21e1bb59c72625e686028a83a39cd4675ca39181;hp=f16919bb9c0d637be5fceed8ff5029fd4f3f3470;hpb=28b1a9fa1e453d9f4761ed623269adc9f50b8fb8;p=tests.git diff --git a/qaapi/qa/Slices.py b/qaapi/qa/Slices.py index f16919b..af343f6 100644 --- a/qaapi/qa/Slices.py +++ b/qaapi/qa/Slices.py @@ -4,23 +4,30 @@ from Table import Table class Slice(dict, Remote): - fields = { - 'plcs': ['TestPLC'], + fields = { + 'plcs': ['TestPLC'], # which plc does this slice belong to 'name': None, 'instantiation': 'plc-instantiated', 'max_nodes': 1000, 'description': 'blank', 'url': None, - 'key': None + 'key': None, # any valid ssh key + 'nodes': [], # nodes where this slice runs + 'persons': [], # persons on this slice + 'tests_path': '/usr/share/tests/', + 'tests': [], # which test to run. None or empty list means run all } - def __init__(self, fields = {}): + def __init__(self, config, fields = {}): dict.__init__(self, self.fields) - + self.config = config self.update(fields) -class Slices(list, Table): - def __init__(self, slices): - slicelist = [Slice(slice) for slice in slices] - list.__init__(self, slicelist) + + +class Slices(Table): + def __init__(self, config, slices): + slicelist = [Slice(config, slice) for slice in slices] + Table.__init__(self, slicelist) + self.config = config