aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-02-18 18:06:56 +0530
committerDeepak S <deepak.s@linux.intel.com>2017-02-21 08:33:44 +0530
commit6f51d2562e010d3d4dba2c4473ac2e6e654558e0 (patch)
tree997c6febd0a33467f2a90cd574973c19c3d71554 /yardstick/benchmark/contexts
parentdc58bc353c43d5a8bdada8278b3b59f50b533ab8 (diff)
improving if conditions :)
Change-Id: I2fad46b07b252f898acfe116dd6542946b8a26a8 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts')
-rw-r--r--yardstick/benchmark/contexts/heat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 4c7f05236..4ca44b0ed 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -158,7 +158,7 @@ class HeatContext(Context):
# workround for openstack nova bug, check JIRA: YARDSTICK-200
# for details
if len(availability_servers) == 2:
- if len(scheduler_hints["different_host"]) == 0:
+ if not scheduler_hints["different_host"]:
scheduler_hints.pop("different_host", None)
server.add_to_template(template,
self.networks,
@@ -197,7 +197,7 @@ class HeatContext(Context):
# add remaining servers with no placement group configured
for server in list_of_servers:
- if len(server.placement_groups) == 0:
+ if not server.placement_groups:
server.add_to_template(template, self.networks, {})
def deploy(self):