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:
@@ -507,7 +507,7 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
|||||||
self.aggregation_method = self.input_parameters.aggregation_method
|
self.aggregation_method = self.input_parameters.aggregation_method
|
||||||
|
|
||||||
# backwards compatibility for node parameter with aggregate.
|
# 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 '
|
LOG.warning('Parameter node has been renamed to compute_node and '
|
||||||
'will be removed in next release.')
|
'will be removed in next release.')
|
||||||
self.aggregation_method['compute_node'] = \
|
self.aggregation_method['compute_node'] = \
|
||||||
|
|||||||
Reference in New Issue
Block a user