Add support for the "--json-stream" option in iperf3 parameters
This option can be set in the command's parameters instead of the "--logfile <logfile>" if special string "json-stream" will be provided as parameter for the Iperf3Parameters class. This new option is supported by iperf3 since iperf3 3.17 and is required for the iperf3 run in the POD which will be introduced soon. Related: #TOBIKO-131 Change-Id: I828aa6d0468e81d26244ff4437141baa211e2c07
This commit is contained in:
parent
5802daab8c
commit
c815209866
@ -17,7 +17,9 @@ from __future__ import absolute_import
|
||||
|
||||
from tobiko.shell.iperf3 import _assert
|
||||
from tobiko.shell.iperf3 import _execute
|
||||
from tobiko.shell.iperf3 import _interface
|
||||
|
||||
JSON_STREAM = _interface.JSON_STREAM
|
||||
|
||||
assert_has_bandwith_limits = _assert.assert_has_bandwith_limits
|
||||
execute_iperf3_client_in_background = \
|
||||
|
@ -23,6 +23,8 @@ from tobiko.shell import sh
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
JSON_STREAM = "json-stream"
|
||||
|
||||
|
||||
def get_iperf3_client_command(parameters: _parameters.Iperf3ClientParameters):
|
||||
interface = Iperf3Interface()
|
||||
@ -123,4 +125,6 @@ class Iperf3Interface:
|
||||
|
||||
@staticmethod
|
||||
def get_logfile_option(logfile):
|
||||
if logfile == JSON_STREAM:
|
||||
return ['--json-stream']
|
||||
return ['--logfile', logfile]
|
||||
|
Loading…
x
Reference in New Issue
Block a user