From eabc66eef336b3c47c366027b205d26db10a3c21 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Mon, 24 Oct 2016 12:37:26 +0100 Subject: 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 Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Bill Michalowski Reviewed-by: Antonio Fischetti Reviewed-by: --- tools/pkt_gen/ixnet/ixnet.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tools/pkt_gen') diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py index 52ba1712..6262a10a 100755 --- a/tools/pkt_gen/ixnet/ixnet.py +++ b/tools/pkt_gen/ixnet/ixnet.py @@ -151,13 +151,17 @@ class IxNet(trafficgen.ITrafficGenerator): Currently only the RFC2544 tests are implemented. """ - _script = os.path.join(settings.getValue('TRAFFICGEN_IXIA_3RD_PARTY'), - settings.getValue('TRAFFICGEN_IXNET_TCL_SCRIPT')) - _tclsh = tkinter.Tcl() - _cfg = None - _logger = logging.getLogger(__name__) - _params = None - _bidir = None + + def __init__(self): + """Initialize IXNET members + """ + self._script = os.path.join(settings.getValue('TRAFFICGEN_IXIA_3RD_PARTY'), + settings.getValue('TRAFFICGEN_IXNET_TCL_SCRIPT')) + self._tclsh = tkinter.Tcl() + self._cfg = None + self._logger = logging.getLogger(__name__) + self._params = None + self._bidir = None def run_tcl(self, cmd): """Run a TCL script using the TCL interpreter found in ``tkinter``. -- cgit 1.2.3-korg