Adapt workload_stabilization strategy to new 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: I4a2f05772248fddd97a41e27be4094eb59ee0bdb
Partially-Implements: blueprint watcher-multi-datasource
This commit is contained in:
Alexander Chadin
2017-12-13 11:53:37 +03:00
parent e401cb7c9d
commit ce196b68c4
7 changed files with 34 additions and 139 deletions

View File

@@ -21,6 +21,13 @@ class FakeGnocchiMetrics(object):
def empty_one_metric(self, emptytype):
self.emptytype = emptytype
# TODO(alexchadin): This method is added as temporary solution until
# all strategies use datasource_backend property.
def temp_mock_get_statistics(self, resource_id, metric, period, aggregate,
granularity=300):
return self.mock_get_statistics(resource_id, metric, granularity,
0, 0, aggregation='mean')
def mock_get_statistics(self, resource_id, metric, granularity,
start_time, stop_time, aggregation='mean'):
result = 0