Merge "[docs] Resolve "nested numbering in toctree?" warning"
[yardstick.git] / yardstick / benchmark / scenarios / base.py
index 58a0280..1737bb9 100644 (file)
@@ -20,6 +20,7 @@ import six
 from stevedore import extension
 
 import yardstick.common.utils as utils
+from yardstick.common import exceptions as y_exc
 
 
 def _iter_scenario_classes(scenario_type=None):
@@ -49,6 +50,9 @@ class Scenario(object):
     def run(self, *args):
         """Entry point for scenario classes, called from runner worker"""
 
+    def is_ended(self):
+        return False
+
     def teardown(self):
         """Default teardown implementation for Scenario classes"""
         pass
@@ -61,6 +65,11 @@ class Scenario(object):
         """Time waited after executing the run method"""
         time.sleep(time_seconds)
 
+    def verify_SLA(self, condition, error_msg):
+        if not condition:
+            raise y_exc.SLAValidationError(
+                case_name=self.__scenario_type__, error_msg=error_msg)
+
     @staticmethod
     def get_types():
         """return a list of known runner type (class) names"""
@@ -113,3 +122,7 @@ class Scenario(object):
             except TypeError:
                 dic[k] = v
         return dic
+
+    def get_mq_ids(self):  # pragma: no cover
+        """Return stored MQ producer IDs, if defined"""
+        pass