diff options
-rw-r--r-- | yardstick/benchmark/scenarios/networking/ping.py | 5 |
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"]) |