Removed unnecessary code from basic_consolidation

In basic_consolidation.py has a method, called calculate_score_vm().
This method used to get vm's id as a parameter, but it was replaced
and now it gets the vm as a parameter. So we don't need to get the
vm from our vm's id, as we already have the vm.

Change-Id: I96af7fbdbe85eda8d4fc44b4b162e8ba9d4967fa
This commit is contained in:
Gábor Antal
2015-12-10 18:51:46 +01:00
parent f98e96da42
commit ba4f5569d1

View File

@@ -292,15 +292,13 @@ class BasicConsolidation(BaseStrategy):
def calculate_score_vm(self, vm, model):
"""Calculate Score of virtual machine
:param vm_id: the id of virtual machine
:param vm: the virtual machine
:param model: the model
:return: score
"""
if model is None:
raise ClusteStateNotDefined()
vm = model.get_vm_from_id(vm.uuid)
vm_cpu_utilization = self.ceilometer. \
statistic_aggregation(resource_id=vm.uuid,
meter_name='cpu_util',