added some helper methods
[tests.git] / qaapi / qa / Slices.py
index 60b78ec..9bac1dc 100644 (file)
@@ -1,15 +1,20 @@
 import os
+from Remote import Remote
 from Table import Table
 
-class Slice(dict):
+class Slice(dict, Remote):
 
      fields = {
-       'plc': None,
+       'plcs': ['TestPLC'],                 # which plc does this slice belong to      
        'name': None,
        'instantiation': 'plc-instantiated',
        'max_nodes': 1000,
        'description': 'blank',
-       'url': None
+       'url': None,
+       'key': None,                         # any valid ssh key
+       'nodes': [],                         # nodes where this slice runs
+       'tests_path': '/usr/share/tests/',      
+       'tests': []                          # which test to run. None or empty list means run all
        }
 
      def __init__(self, fields = {}):
@@ -18,7 +23,7 @@ class Slice(dict):
        
        self.update(fields)
 
-class Slices(list, Table):
+class Slices(Table):
     def __init__(self, slices):
        slicelist = [Slice(slice) for slice in slices]
-       list.__init__(self, slicelist)                                                                          
+       Table.__init__(self, slicelist)