From: Ondrej Lichtner olichtne@redhat.com
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Recipes/ENRT/BaseEnrtRecipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py index 5862311..fb3aae4 100644 --- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py @@ -29,7 +29,7 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate, PerfRecipe): ping_parallel = BoolParam(default=False) ping_bidirect = BoolParam(default=False) ping_count = IntParam(default=100) - ping_interval = StrParam(default=0.2) + ping_interval = FloatParam(default=0.2) ping_psize = IntParam(default=None)
#common perf test params
From: Ondrej Lichtner olichtne@redhat.com
Signed-off-by: Ondrej Lichtner olichtne@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"))
Mon, Mar 16, 2020 at 11:35:29AM CET, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
Signed-off-by: Ondrej Lichtner olichtne@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
On Mon, Mar 16, 2020 at 02:58:49PM +0100, Jan Tluka wrote:
Mon, Mar 16, 2020 at 11:35:29AM CET, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
Signed-off-by: Ondrej Lichtner olichtne@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
From: Ondrej Lichtner olichtne@redhat.com
Base sub configuration header creation should be part of the BaseSubConfigMixin class not the BaseEnrtRecipe class.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Recipes/ENRT/BaseEnrtRecipe.py | 3 --- lnst/Recipes/ENRT/ConfigMixins/BaseSubConfigMixin.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py index 85f5ee4..a90c837 100644 --- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py @@ -92,9 +92,6 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate, PerfRecipe): description = self.generate_sub_configuration_description(config) self.add_result(True, "\n".join(description))
- def generate_sub_configuration_description(self, config): - return ["Sub configuration description:"] - def do_tests(self, recipe_config): self.do_ping_tests(recipe_config) self.do_perf_tests(recipe_config) diff --git a/lnst/Recipes/ENRT/ConfigMixins/BaseSubConfigMixin.py b/lnst/Recipes/ENRT/ConfigMixins/BaseSubConfigMixin.py index 0e16670..6974d16 100644 --- a/lnst/Recipes/ENRT/ConfigMixins/BaseSubConfigMixin.py +++ b/lnst/Recipes/ENRT/ConfigMixins/BaseSubConfigMixin.py @@ -6,7 +6,7 @@ class BaseSubConfigMixin(object): pass
def generate_sub_configuration_description(self, config): - return [] + return ["Sub configuration description:"]
def remove_sub_configuration(self, config): return
lnst-developers@lists.fedorahosted.org