summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-06-22 02:16:39 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-22 02:16:39 +0000
commit0e0e7b90bcd7f829a8a3bc6502310b94dc2df808 (patch)
tree73030df4ec07b04d519f752460009723d0db674a
parentbbd60b6bddcf363d76c1dff34d21158caa18c0a1 (diff)
parenteb142a953a59f447f1c186d2f58004fe354e4c4b (diff)
Merge "ping: don't split if target_vm is a dict"
-rw-r--r--yardstick/benchmark/scenarios/networking/ping.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yardstick/benchmark/scenarios/networking/ping.py b/yardstick/benchmark/scenarios/networking/ping.py
index 95367b3bb..a929e5337 100644
--- a/yardstick/benchmark/scenarios/networking/ping.py
+++ b/yardstick/benchmark/scenarios/networking/ping.py
@@ -76,7 +76,10 @@ class Ping(base.Scenario):
raise RuntimeError(stderr)
if stdout:
- target_vm_name = target_vm.split('.')[0]
+ if isinstance(target_vm, dict):
+ target_vm_name = target_vm.get("name")
+ else:
+ target_vm_name = target_vm.split('.')[0]
rtt_result[target_vm_name] = float(stdout)
if "sla" in self.scenario_cfg:
sla_max_rtt = int(self.scenario_cfg["sla"]["max_rtt"])