All of the tests that inherit from BaseEnrtRecipe will make use of these mixins
so instead of adding them to individual recipes they are included in the base
class.
To control the behaviour on a specific recipe level the recipes can override
the disable_turboboost_host_list and disable_idlestates_host_list properties
and relevant mixin recipe parameters.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 38 ++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index a5296e94..d629b726 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -14,6 +14,10 @@ from lnst.Common.IpAddress import AF_INET, AF_INET6
from lnst.Recipes.ENRT.ConfigMixins.BaseSubConfigMixin import BaseSubConfigMixin
from lnst.Recipes.ENRT.PerfTestMixins import CommonPerfTestTweakMixin
+from lnst.Recipes.ENRT.ConfigMixins.DisableTurboboostMixin import (
+ DisableTurboboostMixin)
+from lnst.Recipes.ENRT.ConfigMixins.DisableIdleStatesMixin import (
+ DisableIdleStatesMixin)
from lnst.RecipeCommon.Ping.Recipe import PingTestAndEvaluate, PingConf
from lnst.RecipeCommon.Perf.Recipe import Recipe as PerfRecipe
@@ -33,7 +37,9 @@ class EnrtConfiguration(object):
"""
pass
-class BaseEnrtRecipe(CommonPerfTestTweakMixin, BaseSubConfigMixin,
+class BaseEnrtRecipe(CommonPerfTestTweakMixin,
+ DisableTurboboostMixin, DisableIdleStatesMixin,
+ BaseSubConfigMixin,
PingTestAndEvaluate, PerfRecipe):
"""Base Recipe class for the ENRT recipe package
@@ -582,3 +588,33 @@ class BaseEnrtRecipe(CommonPerfTestTweakMixin, BaseSubConfigMixin,
interval = pconf.ping_interval,
size = pconf.ping_psize,
)
+
+ @property
+ def disable_turboboost_host_list(self):
+ """
+ The `disable_turboboost_host_list` property value is the list of all
+ matched hosts for the recipe. If a specific recipe needs to change
+ this it should override the :any:`baremetal_hosts` property.
+
+ For detailed explanation of this property see
+ :any:`DisableTurboboostMixin` and
+ :any:`DisableTurboboostMixin.disable_turboboost_host_list`.
+ """
+ return self.baremetal_hosts
+
+ @property
+ def disable_idlestates_host_list(self):
+ """
+ The `disable_idlestates_host_list` property value is the list of all
+ matched hosts for the recipe. If a specific recipe needs to change
+ this it should override the :any:`baremetal_hosts` property.
+
+ For detailed explanation of this property see
+ :any:`DisableIdleStatesMixin` and
+ :any:`DisableIdleStatesMixin.disable_idlestates_host_list`.
+ """
+ return self.baremetal_hosts
+
+ @property
+ def baremetal_hosts(self):
+ return self.matched
--
2.21.3