basic_cons fix

Change-Id: I0856fadc3aaece3be286af9047339ce63d54be29
This commit is contained in:
Alexander Chadin
2018-03-09 14:52:57 +03:00
parent cb497d2642
commit 45a06445f3

View File

@@ -285,12 +285,12 @@ class BasicConsolidation(base.ServerConsolidationBaseStrategy):
resource_id = "%s_%s" % (node.uuid, node.hostname) resource_id = "%s_%s" % (node.uuid, node.hostname)
return self.datasource_backend.get_host_cpu_usage( return self.datasource_backend.get_host_cpu_usage(
resource_id, self.period, self.aggregation_method['node'], resource_id, self.period, self.aggregation_method['node'],
granularity=300) granularity=self.granularity)
def get_instance_cpu_usage(self, instance): def get_instance_cpu_usage(self, instance):
return self.datasource_backend.get_instance_cpu_usage( return self.datasource_backend.get_instance_cpu_usage(
instance.uuid, self.period, self.aggregation_method['instance'], instance.uuid, self.period, self.aggregation_method['instance'],
granularity=300) granularity=self.granularity)
def calculate_score_node(self, node): def calculate_score_node(self, node):
"""Calculate the score that represent the utilization level """Calculate the score that represent the utilization level