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>
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
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: