diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-10-24 12:37:26 +0100 |
---|---|---|
committer | Martin Klozik <martinx.klozik@intel.com> | 2016-11-09 12:20:37 +0000 |
commit | eabc66eef336b3c47c366027b205d26db10a3c21 (patch) | |
tree | bd7363a3b1afd232facdba59c7b4f32915cb1461 /core/traffic_controller_rfc2889.py | |
parent | 9c13028cf9b29da86e5b12c5d3b8c4d6bd858545 (diff) |
cli: Modify configuration via CLI
In the past, only a few configuration parameters could be
modified via --test-params CLI argument and it was not easy
to find out their complete list.
This patch adds support for generic modification of any
configuration parameter via CLI argument --test-params
or by "Parameters" section of testcase definition.
Thus it is possible to customize a vsperf configuration
environment per testcase or for each vsperf execution.
Old CLI parameters duration, pkt_sizes, rfc2544_tests
and rfc2889_trials were renamed to TRAFFICGEN_DURATION,
TRAFFICGEN_PKT_SIZES, TRAFFICGEN_RFC2544_TESTS and
TRAFFICGEN_RFC2889_TRIALS to be consistent with
other configuration parameters.
JIRA: VSPERF-375
Change-Id: I50a1f4ff7250d754aa8af0295a9c7c1be8151175
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Bill Michalowski <bmichalo@redhat.com>
Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com>
Reviewed-by: <sridhar.rao@spirent.com>
Diffstat (limited to 'core/traffic_controller_rfc2889.py')
-rw-r--r-- | core/traffic_controller_rfc2889.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/traffic_controller_rfc2889.py b/core/traffic_controller_rfc2889.py index a2e12e6d..210d5f5f 100644 --- a/core/traffic_controller_rfc2889.py +++ b/core/traffic_controller_rfc2889.py @@ -15,7 +15,7 @@ """ from core.traffic_controller import TrafficController from core.results.results import IResults -from conf import get_test_param +from conf import settings class TrafficControllerRFC2889(TrafficController, IResults): @@ -32,7 +32,7 @@ class TrafficControllerRFC2889(TrafficController, IResults): """ super(TrafficControllerRFC2889, self).__init__(traffic_gen_class) self._type = 'rfc2889' - self._trials = int(get_test_param('rfc2889_trials', 1)) + self._trials = int(settings.getValue('TRAFFICGEN_RFC2889_TRIALS')) def send_traffic(self, traffic): """See TrafficController for description @@ -83,7 +83,6 @@ class TrafficControllerRFC2889(TrafficController, IResults): else: function['function']() result = self._traffic_gen_class.wait_rfc2889_forwarding( - traffic, trials=self._trials, duration=self._duration) + traffic, trials=self._trials, duration=self._duration) result = self._append_results(result, packet_size) self._results.append(result) - |