aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios
diff options
context:
space:
mode:
authorKristian Hunt <kristian.hunt@gmail.com>2015-07-07 09:59:56 +0200
committerHans Feldt <hans.feldt@ericsson.com>2015-07-08 07:08:45 +0000
commit43659c391a0a6ed6fc7ce832e2b6fe839e814ce3 (patch)
tree5a4990ca3a0f82eadf2ed3a351fd6498604579fe /yardstick/benchmark/scenarios
parentd71e101ac1420ed03fa2dbecb76fc8156a16761a (diff)
Fix iperf3 target ipaddr and no options
1. Fixes runner failing because of key error in context 'target_ipaddr'. 2. Fixes type error when no options are specified in the task file (for example as in the current iperf3 sample task file). JIRA:- Change-Id: I21a1dea4571c14dbb1f9862dcf70b078837ebf07 Signed-off-by: Kristian Hunt <kristian.hunt@gmail.com>
Diffstat (limited to 'yardstick/benchmark/scenarios')
-rw-r--r--yardstick/benchmark/scenarios/networking/iperf3.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yardstick/benchmark/scenarios/networking/iperf3.py b/yardstick/benchmark/scenarios/networking/iperf3.py
index 88423725e..3c4cd1fbf 100644
--- a/yardstick/benchmark/scenarios/networking/iperf3.py
+++ b/yardstick/benchmark/scenarios/networking/iperf3.py
@@ -53,7 +53,7 @@ For more info see http://software.es.net/iperf
self.context = context
self.user = context.get('user', 'ubuntu')
self.host_ipaddr = context['host']
- self.target_ipaddr = context['target_ipaddr']
+ self.target_ipaddr = context['target']
self.key_filename = self.context.get('key_filename', '~/.ssh/id_rsa')
self.setup_done = False
@@ -92,6 +92,10 @@ For more info see http://software.es.net/iperf
cmd = "iperf3 -c %s --json" % (self.target_ipaddr)
+ # If there are no options specified
+ if not options:
+ options = ""
+
if "udp" in options:
cmd += " --udp"
else: