]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Windows SMBFS: Handle volume_name in _qemu_img_info
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 30 Sep 2014 08:58:22 +0000 (11:58 +0300)
committerEric Harney <eharney@redhat.com>
Thu, 2 Oct 2014 17:04:21 +0000 (13:04 -0400)
The volume_name is now parsed to the _qemu_img_info wrapper. As
this method is not prone to security issues because this driver
does not support raw images (at least not yet), we don't have to
perform any checks on the backing image file path.

Thus, this method simply ignores this argument that will be parsed
by the base class methods.

Related-Bug: #1350504

Change-Id: I801a6338250ec2dc631c4058543f7d0088b3e4d4
(cherry picked from commit 5e0ce63d6df39dcad5a0ef35553369e49c67dfb8)

cinder/volume/drivers/windows/smbfs.py

index 275e07945a3fc8f1f38591975d43502d3fe217d8..c2c07985b2dc23786b71313d14c1b9b61e523a93 100644 (file)
@@ -135,7 +135,7 @@ class WindowsSmbfsDriver(smbfs.SmbfsDriver):
         backing_file_path = os.path.join(image_dir, backing_file)
         self.vhdutils.reconnect_parent(image, backing_file_path)
 
-    def _qemu_img_info(self, path):
+    def _qemu_img_info(self, path, volume_name=None):
         # This code expects to deal only with relative filenames.
         # As this method is needed by the upper class and qemu-img does
         # not fully support vhdx images, for the moment we'll use Win32 API