From: Ondrej Lichtner <olichtne(a)redhat.com>
The evaluate_results method signature changed in
cd5328db8b0196a6102ebea54bdea1ce632cfe46 and the ping evaluators weren't
updated...
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py | 10 +++++++++-
.../Ping/Evaluators/ZeroPassPingEvaluator.py | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
b/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
index 6760d32..f2a3dce 100644
--- a/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
+++ b/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
@@ -1,3 +1,6 @@
+from typing import List, Any
+
+from lnst.Controller.Recipe import BaseRecipe
from lnst.RecipeCommon.BaseResultEvaluator import BaseResultEvaluator
class RatePingEvaluator(BaseResultEvaluator):
@@ -12,7 +15,12 @@ def __init__(self, min_rate=None, max_rate=None, rate=None):
self.__class__.__name__)
)
- def evaluate_results(self, recipe, result):
+ def evaluate_results(
+ self,
+ recipe: BaseRecipe,
+ recipe_conf: Any,
+ result: List[Any],
+ ):
result_status = True
ping_rate = int(result['rate'])
diff --git a/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
b/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
index 350e157..afb3d02 100644
--- a/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
+++ b/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
@@ -1,7 +1,15 @@
+from typing import List, Any
+
+from lnst.Controller.Recipe import BaseRecipe
from lnst.RecipeCommon.BaseResultEvaluator import BaseResultEvaluator
class ZeroPassPingEvaluator(BaseResultEvaluator):
- def evaluate_results(self, recipe, result):
+ def evaluate_results(
+ self,
+ recipe: BaseRecipe,
+ recipe_conf: Any,
+ result: List[Any],
+ ):
result_status = True
trans_packets = int(result['trans_pkts'])
recv_packets = int(result['recv_pkts'])
--
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...
There's one more change required here and that is in:
lnst/RecipeCommon/Ping/Recipe.py and PingTestAndEvaluate.single_ping_evaluate()
This uses:
evaluator.evaluate_results(self, result[1])
which needs to be updated.
Also wondering if specific recipes (Ipsec) that override the ping
functionality requires updates, too.
-Jan