]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Handle 'infinite' and 'unknown' capacity in CapacityWeigher
authorZhiteng Huang <zhiteng.huang@intel.com>
Sun, 17 Feb 2013 08:32:04 +0000 (16:32 +0800)
committerZhiteng Huang <zhiteng.huang@intel.com>
Sun, 17 Feb 2013 08:32:04 +0000 (16:32 +0800)
commitd0469bdc510443a2e7cd5a0dce5eab206a247527
treeae7be3b04390dd8f5cbe860b2e1bc26ce23e099b
parente835c9f817700650adbdbf9b52914a2b2afbeabf
Handle 'infinite' and 'unknown' capacity in CapacityWeigher

This patch updates CapacityWeigher to transform 'infinite' and
'unknown' capacity reported by back-ends to float('inf').  They
are considered the same for sorting purpose.

Change-Id: Ic8f811227c9937c4e09eb8b77457ed7e9231be4e
cinder/scheduler/weights/capacity.py