]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Windows SMBFS: fix volume extend
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 27 Mar 2015 12:15:25 +0000 (14:15 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 16 Apr 2015 10:24:34 +0000 (13:24 +0300)
The Windows SMBFS driver inherits the Linux SMBFS driver,
overriding Windows specific methods.

This commit Ic89cffc93940b7b119cfcde3362f304c9f2875df added the
volume name as an extra argument to the _do_extend_volume in order
to check if differencing images are pointing to backing files other
than the according volume disks.

Although this is not required on Windows, this method should accept
this extra argument in order to have the same signature as the
method it overrides. At the moment, this raises the following
exception:

TypeError: _do_extend_volume() takes exactly 3 arguments (4 given)

Change-Id: I868d7de4a2c68f3fc520ba476a5660a84f440bb1
Closes-Bug: #1437290

cinder/volume/drivers/windows/smbfs.py

index 8ec9688cafe47c9a86c616fb53eea4fcf44e0cbd..533265ed5e95a2f0371eeaba5c6c8c00a1db63d5 100644 (file)
@@ -164,7 +164,7 @@ class WindowsSmbfsDriver(smbfs.SmbfsDriver):
         self.vhdutils.create_differencing_vhd(new_snap_path,
                                               backing_file_full_path)
 
-    def _do_extend_volume(self, volume_path, size_gb):
+    def _do_extend_volume(self, volume_path, size_gb, volume_name=None):
         self.vhdutils.resize_vhd(volume_path, size_gb * units.Gi)
 
     @utils.synchronized('smbfs', external=False)