]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Wrap the method to calculate virtual free capacity
authorXinXiaohui <xiaohui.xin@intel.com>
Thu, 24 Dec 2015 06:19:25 +0000 (14:19 +0800)
committerXinXiaohui <xiaohui.xin@intel.com>
Thu, 21 Jan 2016 02:45:10 +0000 (10:45 +0800)
commit81fcf8f5ea4283647d0b23dd6115ed8714625917
tree26552c424af31e5b450989d1018510165fdf0e6d
parent7e040192d4a33fbe18f569cf10d8c786c8c369f8
Wrap the method to calculate virtual free capacity

There is a logic already there to calculate virtual
free capacity in cinder/scheduler/weights/capacity.py.
This patch is just to wrap the same logic into a
method in case to avoid the inconsistency when there
are some other code paths to use the the same logic
seperately. The reason for the patch is that:
the patch for blueprint capacity-headroom has the
same code path, and some reviewers prefer to use a
single method to call them in the same way.

Partial-Implements: blueprint capacity-headroom
Change-Id: I7554699760f2173655cb4fae434bd4933be77c9c
cinder/scheduler/weights/capacity.py
cinder/tests/unit/test_utils.py
cinder/utils.py