Merge "update node resource capacity for basic_consolidation"
This commit is contained in:
commit
d55bb1fa95
|
@ -232,9 +232,9 @@ class BasicConsolidation(base.ServerConsolidationBaseStrategy):
|
|||
:param total_mem: total memory used by the virtual machine
|
||||
:return: True if the threshold is not exceed
|
||||
"""
|
||||
cpu_capacity = destination_node.vcpus
|
||||
disk_capacity = destination_node.disk
|
||||
memory_capacity = destination_node.memory
|
||||
cpu_capacity = destination_node.vcpu_capacity
|
||||
disk_capacity = destination_node.disk_gb_capacity
|
||||
memory_capacity = destination_node.memory_mb_capacity
|
||||
|
||||
return (cpu_capacity >= total_cores * self.threshold_cores and
|
||||
disk_capacity >= total_disk * self.threshold_disk and
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<ModelRoot>
|
||||
<ComputeNode hostname="hostname_0" uuid="Node_0" id="0" state="up" status="enabled" vcpus="16" disk="250" disk_capacity="250" memory="64">
|
||||
<ComputeNode hostname="hostname_0" uuid="Node_0" id="0" state="up" status="enabled" vcpus="16" vcpu_reserved="0" vcpu_ratio="1" disk="250" disk_gb_reserved="0" disk_ratio="1" disk_capacity="250" memory="64" memory_mb_reserved="0" memory_ratio="1">
|
||||
<Instance watcher_exclude="False" name="" state="active" uuid="INSTANCE_0" vcpus="2" disk="20" disk_capacity="20" memory="2" metadata='{"optimize": true,"top": "floor", "nested": {"x": "y"}}' project_id="91FFFE30-78A0-4152-ACD2-8310FF274DC9"/>
|
||||
<Instance watcher_exclude="False" name="" state="active" uuid="INSTANCE_1" vcpus="2" disk="20" disk_capacity="20" memory="2" metadata='{"optimize": true,"top": "floor", "nested": {"x": "y"}}' project_id="91FFFE30-78A0-4152-ACD2-8310FF274DC9"/>
|
||||
<Instance watcher_exclude="False" name="" state="active" uuid="INSTANCE_2" vcpus="2" disk="20" disk_capacity="20" memory="2" metadata='{"optimize": true,"top": "floor", "nested": {"x": "y"}}' project_id="91FFFE30-78A0-4152-ACD2-8310FF274DC9"/>
|
||||
</ComputeNode>
|
||||
<ComputeNode hostname="hostname_1" uuid="Node_1" id="1" state="up" status="enabled" vcpus="16" disk="250" disk_capacity="250" memory="64">
|
||||
<ComputeNode hostname="hostname_1" uuid="Node_1" id="1" state="up" status="enabled" vcpus="16" vcpu_reserved="0" vcpu_ratio="1" disk="250" disk_gb_reserved="0" disk_ratio="1" disk_capacity="250" memory="64" memory_mb_reserved="0" memory_ratio="1">
|
||||
<Instance watcher_exclude="False" name="" state="active" uuid="INSTANCE_3" vcpus="2" disk="20" disk_capacity="20" memory="2" metadata='{"optimize": true,"top": "floor", "nested": {"x": "y"}}' project_id="91FFFE30-78A0-4152-ACD2-8310FF274DC9"/>
|
||||
</ComputeNode>
|
||||
<ComputeNode hostname="hostname_2" uuid="Node_2" id="2" state="up" status="enabled" vcpus="16" disk="250" disk_capacity="250" memory="64">
|
||||
<ComputeNode hostname="hostname_2" uuid="Node_2" id="2" state="up" status="enabled" vcpus="16" vcpu_reserved="0" vcpu_ratio="1" disk="250" disk_gb_reserved="0" disk_ratio="1" disk_capacity="250" memory="64" memory_mb_reserved="0" memory_ratio="1">
|
||||
<Instance watcher_exclude="False" name="" state="active" uuid="INSTANCE_4" vcpus="2" disk="20" disk_capacity="20" memory="2" metadata='{"optimize": true,"top": "floor", "nested": {"x": "y"}}' project_id="91FFFE30-78A0-4152-ACD2-8310FF274DC9"/>
|
||||
</ComputeNode>
|
||||
<ComputeNode hostname="hostname_3" uuid="Node_3" id="3" state="up" status="enabled" vcpus="16" disk="250" disk_capacity="250" memory="64">
|
||||
<ComputeNode hostname="hostname_3" uuid="Node_3" id="3" state="up" status="enabled" vcpus="16" vcpu_reserved="0" vcpu_ratio="1" disk="250" disk_gb_reserved="0" disk_ratio="1" disk_capacity="250" memory="64" memory_mb_reserved="0" memory_ratio="1">
|
||||
<Instance watcher_exclude="False" name="" state="active" uuid="INSTANCE_5" vcpus="2" disk="20" disk_capacity="20" memory="2" metadata='{"optimize": true,"top": "floor", "nested": {"x": "y"}}' project_id="91FFFE30-78A0-4152-ACD2-8310FF274DC9"/>
|
||||
</ComputeNode>
|
||||
</ModelRoot>
|
||||
|
|
Loading…
Reference in New Issue