This method will be reused by other mixin classes.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Recipes/ENRT/PerfTestMixins/BasePerfTestTweakMixin.py | 6 ++++++
.../ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py | 6 ------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lnst/Recipes/ENRT/PerfTestMixins/BasePerfTestTweakMixin.py
b/lnst/Recipes/ENRT/PerfTestMixins/BasePerfTestTweakMixin.py
index 380fc72e..5e008a68 100644
--- a/lnst/Recipes/ENRT/PerfTestMixins/BasePerfTestTweakMixin.py
+++ b/lnst/Recipes/ENRT/PerfTestMixins/BasePerfTestTweakMixin.py
@@ -1,3 +1,5 @@
+from lnst.RecipeCommon.Perf.Measurements.BaseFlowMeasurement import BaseFlowMeasurement
+
class BasePerfTestTweakMixin(object):
"""
This is a base class that defines common API for specific *perf test*
@@ -13,3 +15,7 @@ class BasePerfTestTweakMixin(object):
def remove_perf_test_tweak(self, perf_config):
# TODO: check if anything left in the perf_config.perf_test_tweak_config
pass
+
+ def _get_flow_measurement_from_config(self, perf_config):
+ flow_measurements = [ m for m in perf_config.measurements if isinstance(m,
BaseFlowMeasurement) ]
+ return flow_measurements[0]
diff --git a/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
b/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
index 6c6cc416..c0520405 100644
--- a/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
+++ b/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
@@ -1,13 +1,7 @@
from lnst.Controller.RecipeResults import ResultLevel
from lnst.Recipes.ENRT.PerfTestMixins import BasePerfTestTweakMixin
-from lnst.RecipeCommon.Perf.Measurements.BaseFlowMeasurement import BaseFlowMeasurement
class SctpFirewallPerfTestMixin(BasePerfTestTweakMixin):
-
- def _get_flow_measurement_from_config(self, perf_config):
- flow_measurements = [ m for m in perf_config.measurements if isinstance(m,
BaseFlowMeasurement) ]
- return flow_measurements[0]
-
def apply_perf_test_tweak(self, perf_config):
super().apply_perf_test_tweak(perf_config)
--
2.21.3