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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user