From: Ondrej Lichtner <olichtne(a)redhat.com>
* removed unused imports
* reordered parameters and added documentary comments to split them into
logical groups
* removed some formatting empty lines
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 33 ++++++++++++-----------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index 6582751..d89ad03 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -1,13 +1,9 @@
-import re
import pprint
from contextlib import contextmanager
from lnst.Common.LnstError import LnstError
from lnst.Common.Parameters import Param, IntParam, StrParam, BoolParam, ListParam
from lnst.Common.IpAddress import AF_INET, AF_INET6
-from lnst.Common.ExecCmd import exec_cmd
-from lnst.Controller.Recipe import BaseRecipe, RecipeError
-from lnst.Controller.RecipeResults import ResultLevel
from lnst.Recipes.ENRT.ConfigMixins.BaseSubConfigMixin import BaseSubConfigMixin
@@ -22,27 +18,28 @@
class EnrtConfiguration(object):
pass
-
class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate, PerfRecipe):
- ip_versions = Param(default=("ipv4", "ipv6"))
-
- ping_parallel = BoolParam(default=False)
- ping_bidirect = BoolParam(default=False)
- ping_count = IntParam(default = 100)
- ping_interval = StrParam(default = 0.2)
- ping_psize = IntParam(default = None)
-
- perf_tests = Param(default=("tcp_stream", "udp_stream",
"sctp_stream"))
-
+ #common requirements parameters
driver = StrParam(default="ixgbe")
+ #common configuration parameters
+ mtu = IntParam(mandatory=False)
adaptive_rx_coalescing = BoolParam(mandatory=False)
adaptive_tx_coalescing = BoolParam(mandatory=False)
- mtu = IntParam(mandatory=False)
+ #common test parameters
+ ip_versions = Param(default=("ipv4", "ipv6"))
- perf_tool_cpu = IntParam(mandatory=False)
+ #common ping test params
+ ping_parallel = BoolParam(default=False)
+ ping_bidirect = BoolParam(default=False)
+ ping_count = IntParam(default=100)
+ ping_interval = StrParam(default=0.2)
+ ping_psize = IntParam(default=None)
+ #common perf test params
+ perf_tests = Param(default=("tcp_stream", "udp_stream",
"sctp_stream"))
+ perf_tool_cpu = IntParam(mandatory=False)
perf_duration = IntParam(default=60)
perf_iterations = IntParam(default=5)
perf_parallel_streams = IntParam(default=1)
@@ -50,7 +47,6 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
perf_reverse = BoolParam(default=False)
net_perf_tool = Param(default=IperfFlowMeasurement)
-
cpu_perf_tool = Param(default=StatCPUMeasurement)
def test(self):
@@ -236,7 +232,6 @@ def cpu_perf_evaluators(self):
def net_perf_evaluators(self):
return [NonzeroFlowEvaluator()]
-
def _create_reverse_flow(self, flow):
rev_flow = PerfFlow(
type = flow.type,
--
2.22.0