On Mon, Mar 16, 2020 at 02:58:49PM +0100, Jan Tluka wrote:
Mon, Mar 16, 2020 at 11:35:29AM CET, olichtne(a)redhat.com wrote:
>From: Ondrej Lichtner <olichtne(a)redhat.com>
>
>Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
>---
> lnst/Common/Parameters.py | 2 +-
> lnst/Recipes/ENRT/BaseEnrtRecipe.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/lnst/Common/Parameters.py b/lnst/Common/Parameters.py
>index b8d85cd..e56c32d 100644
>--- a/lnst/Common/Parameters.py
>+++ b/lnst/Common/Parameters.py
>@@ -27,7 +27,7 @@ class Param(object):
> def __init__(self, mandatory=False, **kwargs):
> self.mandatory = mandatory
> if "default" in kwargs:
>- self.default = kwargs["default"]
>+ self.default = self.type_check(kwargs["default"])
>
> def type_check(self, value):
> return value
>diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
>index fb3aae4..85f5ee4 100644
>--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
>+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
>@@ -30,7 +30,7 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
> ping_bidirect = BoolParam(default=False)
> ping_count = IntParam(default=100)
> ping_interval = FloatParam(default=0.2)
>- ping_psize = IntParam(default=None)
>+ ping_psize = IntParam(default=56)
>
> #common perf test params
> perf_tests = Param(default=("tcp_stream", "udp_stream",
"sctp_stream"))
The second hunk should go to separate patch.
-Jan
I was considering that, they would have to be in the reverse order then
- first the None->56 change; then the type check for default.
I merged them because the type check for default broke the recipe - None
doesn't pass the type check, so I included the fix into a single commit.
I'll split the patches and send a v2.
-Ondrej