Resolve aggregate error in workload_stabilization

This error is caused because the condition "is not '':" is not always
true. Sometimes self.aggregation_method['node'] is u'' instead of ''.
This patch ensures that in both cases the behavior is the same.

Change-Id: I7453678cc76892ebeacca23c3501a10a08725d1d
Closes-bug: #1836195
This commit is contained in:
Dantali0n
2019-07-11 14:54:04 +02:00
parent 5259e5b332
commit 80e8d0002a

View File

@@ -507,7 +507,7 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
self.aggregation_method = self.input_parameters.aggregation_method
# backwards compatibility for node parameter with aggregate.
if self.aggregation_method['node'] is not '':
if self.aggregation_method['node']:
LOG.warning('Parameter node has been renamed to compute_node and '
'will be removed in next release.')
self.aggregation_method['compute_node'] = \