]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
rbd: Change capacity calculation from integer to float
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 7 Mar 2016 15:25:09 +0000 (16:25 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 9 Mar 2016 07:49:03 +0000 (08:49 +0100)
commitfba1af2bb1382af029e0340512f30b1ba10d389b
tree5dd132a72d75779996cfe7f803cf86c08af63088
parentd57e7882bd80508ebe2421db6b71d7301cdfe0e4
rbd: Change capacity calculation from integer to float

The current capacity calculation in the rbd driver use old
c-style integer calculation while e.g. the scheduler
_weigh_object function uses float, therefore calculate
capacity information in float with 2 digits precision for
Gb sizes.

Closes-Bug: #1508340

Change-Id: I1a731c7606a7dee0295b1604b582447d2da6e750
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
cinder/tests/unit/test_rbd.py
cinder/volume/drivers/rbd.py