From: Ondrej Lichtner <olichtne(a)redhat.com>
Because the mixin classes for idlestates and turboboost disabling were
moved to be inherited into the Baremetal and Virtual enrtrecipes base
classes, the host list definition in BaseEnrtRecipe was being overriden
by the higher placed base definition in the original mixin classes like
this:
SimpleNetworkRecipe -> Mixin -> BaseEnrtRecipe
The base definition of the "host_list" just returns [], and doesn't call
super so the definition from BaseEnrtRecipe was never called. This
effectively disabled the mixins in all the enrt recipes that previously
used them.
Moving these to the new base classes of BaremetalEnrtRecipe and
VirtualEnrtRecipe fixes the issue.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Recipes/ENRT/BaremetalEnrtRecipe.py | 24 +++++++++++++++++-
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 32 ------------------------
lnst/Recipes/ENRT/VirtualEnrtRecipe.py | 24 ++++++++++++++++++
3 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py
b/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py
index da19095..59e222d 100644
--- a/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py
@@ -23,4 +23,26 @@ class BaremetalEnrtRecipe(
IperfMeasurementGenerator,
BaseEnrtRecipe,
):
- pass
+ @property
+ def disable_idlestates_host_list(self):
+ """
+ The `disable_idlestates_host_list` property value is the list of all
+ matched baremetal hosts for the recipe.
+
+ For detailed explanation of this property see
+ :any:`DisableIdleStatesMixin` and
+ :any:`DisableIdleStatesMixin.disable_idlestates_host_list`.
+ """
+ return self.matched
+
+ @property
+ def disable_turboboost_host_list(self):
+ """
+ The `disable_turboboost_host_list` property value is the list of all
+ matched baremetal hosts for the recipe.
+
+ For detailed explanation of this property see
+ :any:`DisableTurboboostMixin` and
+ :any:`DisableTurboboostMixin.disable_turboboost_host_list`.
+ """
+ return self.matched
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index 9813ba6..c263cfd 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -449,8 +449,6 @@ def condition():
self.ctl.wait_for_condition(condition, timeout=5)
-
-
def _create_reverse_ping(self, pconf):
return PingConf(
client = pconf.destination,
@@ -461,33 +459,3 @@ def _create_reverse_ping(self, pconf):
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
diff --git a/lnst/Recipes/ENRT/VirtualEnrtRecipe.py
b/lnst/Recipes/ENRT/VirtualEnrtRecipe.py
index 82d6e3a..d706815 100644
--- a/lnst/Recipes/ENRT/VirtualEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/VirtualEnrtRecipe.py
@@ -26,3 +26,27 @@ class VirtualEnrtRecipe(
@property
def hypervisor_hosts(self):
return set([self.matched.host1, self.matched.host2])
+
+ @property
+ def disable_idlestates_host_list(self):
+ """
+ The `disable_idlestates_host_list` property value is the list of all
+ matched baremetal hosts for the recipe.
+
+ For detailed explanation of this property see
+ :any:`DisableIdleStatesMixin` and
+ :any:`DisableIdleStatesMixin.disable_idlestates_host_list`.
+ """
+ return self.hypervisor_hosts
+
+ @property
+ def disable_turboboost_host_list(self):
+ """
+ The `disable_turboboost_host_list` property value is the list of all
+ matched baremetal hosts for the recipe.
+
+ For detailed explanation of this property see
+ :any:`DisableTurboboostMixin` and
+ :any:`DisableTurboboostMixin.disable_turboboost_host_list`.
+ """
+ return self.hypervisor_hosts
--
2.30.0
_______________________________________________
LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...