Adapt workload_balance strategy to multiple datasource backend

This patch set:
1. Removes nova, ceilometer and gnocchi properties.
2. Adds using of datasource_backend properties along with
   statistic_aggregation method.
3. Changes type of datasource config.

Change-Id: I09d2dce00378f0ee5381d7c85006752aea6975d2
Partially-Implements: blueprint watcher-multi-datasource
This commit is contained in:
Alexander Chadin
2018-01-11 13:27:56 +03:00
parent 5dd6817d47
commit 891f6bc241
4 changed files with 20 additions and 95 deletions

View File

@@ -87,8 +87,8 @@ class FakeGnocchiMetrics(object):
mock[uuid] = 25 * oslo_utils.units.Ki
return mock[str(uuid)]
def mock_get_statistics_wb(self, resource_id, metric, granularity,
start_time, stop_time, aggregation='mean'):
def mock_get_statistics_wb(self, resource_id, metric, period, aggregate,
granularity=300):
result = 0.0
if metric == "cpu_util":
result = self.get_average_usage_instance_cpu_wb(resource_id)