From: Eric Harney Date: Wed, 19 Jun 2013 20:31:07 +0000 (-0400) Subject: Add _create_volume to ThinLVMVolumeDriver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=79a402d07502ac34bc0ec485b21b0be50ba807a7;p=openstack-build%2Fcinder-build.git Add _create_volume to ThinLVMVolumeDriver Previously, _create_volume from LVMISCSIDriver would be called when the volume manager calls create_volume_from_snapshot. Fixes bug: 1192601 Change-Id: I5cca287e8204c4647a5f09df961d9a76d0b38c42 --- diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 3c214cc5f..756b4d66d 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -643,16 +643,17 @@ class ThinLVMVolumeDriver(LVMISCSIDriver): self._try_execute('lvcreate', '-s', '-n', new_name, src_lvm_name, run_as_root=True) - def create_volume(self, volume): - """Creates a logical volume. Can optionally return a Dictionary of - changes to the volume object to be persisted. - """ + def _create_volume(self, volume): sizestr = self._sizestr(volume['size']) vg_name = ("%s/%s-pool" % (self.configuration.volume_group, self.configuration.volume_group)) self._try_execute('lvcreate', '-T', '-V', sizestr, '-n', volume['name'], vg_name, run_as_root=True) + def create_volume(self, volume): + """Creates a logical volume.""" + self._create_volume(volume) + def delete_volume(self, volume): """Deletes a logical volume.""" if self._volume_not_present(volume['name']):