remove config parameter 'datasource'

Change-Id: I9d8435663710f4c5f1698df71bec67aa799722bd
This commit is contained in:
licanwei 2019-02-19 17:01:50 +08:00
parent e74ab79e81
commit 9c4b750c9a
2 changed files with 3 additions and 3 deletions

View File

@ -308,7 +308,7 @@ class BasicConsolidation(base.ServerConsolidationBaseStrategy):
"for %(metric_name)s", dict(
resource_id=resource_id,
metric_name=self.METRIC_NAMES[
self.config.datasource]['host_cpu_usage']))
self.datasource_backend.NAME]['host_cpu_usage']))
host_avg_cpu_util = 100
total_cores_used = node.vcpus * (host_avg_cpu_util / 100.0)
@ -328,7 +328,7 @@ class BasicConsolidation(base.ServerConsolidationBaseStrategy):
"for %(metric_name)s", dict(
resource_id=instance.uuid,
metric_name=self.METRIC_NAMES[
self.config.datasource]['instance_cpu_usage']))
self.datasource_backend.NAME]['instance_cpu_usage']))
instance_cpu_utilization = 100
total_cores_used = instance.vcpus * (instance_cpu_utilization / 100.0)

View File

@ -273,7 +273,7 @@ class WorkloadBalance(base.WorkloadStabilizationBaseStrategy):
except Exception as exc:
LOG.exception(exc)
LOG.error("Can not get %s from %s", self._meter,
self.config.datasource)
self.datasource_backend.NAME)
continue
if util is None:
LOG.debug("Instance (%s): %s is None",