diff options
-rw-r--r-- | yardstick/benchmark/contexts/heat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 0b9a4d294..4c7f05236 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -221,9 +221,9 @@ class HeatContext(Context): # copy some vital stack output into server objects for server in self.servers: - if len(server.ports) > 0: + if server.ports: # TODO(hafe) can only handle one internal network for now - port = list(server.ports.values())[0] + port = next(iter(server.ports.values())) server.private_ip = self.stack.outputs[port["stack_name"]] if server.floating_ip: |