from cinder import exception
from cinder.openstack.common import log as logging
from cinder import test
+from cinder import units
from cinder.volume.drivers.san.hp import hp_3par_fc as hpfcdriver
from cinder.volume.drivers.san.hp import hp_3par_iscsi as hpdriver
from cinder.volume import qos_specs
old_size = self.volume['size']
new_size = old_size + grow_size
self.driver.extend_volume(self.volume, str(new_size))
+ growth_size_mib = grow_size * units.KiB
expected = [
- mock.call.growVolume(self.VOLUME_3PAR_NAME, grow_size)]
+ mock.call.growVolume(self.VOLUME_3PAR_NAME, growth_size_mib)]
mock_client.assert_has_calls(expected)
2.0.2 - Add back-end assisted volume migrate
2.0.3 - Allow deleting missing snapshots bug #1283233
2.0.4 - Allow volumes created from snapshots to be larger bug #1279478
+ 2.0.5 - Fix extend volume units bug #1284368
"""
- VERSION = "2.0.4"
+ VERSION = "2.0.5"
stats = {}
growth_size = int(new_size) - old_size
LOG.debug("Extending Volume %s from %s to %s, by %s GB." %
(volume_name, old_size, new_size, growth_size))
+ growth_size_mib = growth_size * units.KiB
try:
- self.client.growVolume(volume_name, growth_size)
+ self.client.growVolume(volume_name, growth_size_mib)
except Exception:
with excutils.save_and_reraise_exception():
LOG.error(_("Error extending volume %s") % volume)