Change in vdsm[master]: fix REMOVED_IMAGE_PREFIX not defined error

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Wed Nov 7 09:41:04 UTC 2012


Zhou Zheng Sheng has uploaded a new change for review.

Change subject: fix REMOVED_IMAGE_PREFIX not defined error
......................................................................

fix REMOVED_IMAGE_PREFIX not defined error

Recently http://gerrit.ovirt.org/#/c/8506 is merged, it moves
REMOVED_IMAGE_PREFIX = "_remove_me_" from vdsm/storage/image.py to
vdsm/storage/sd.py. So all occurrence of REMOVED_IMAGE_PREFIX in
image.py must be changed to sd.REMOVED_IMAGE_PREFIX, otherwise
pyflakes will say REMOVED_IMAGE_PREFIX not defined.

Change-Id: Ifc6ec49ff20c7f8a18ae14fe205570dfc6ce7634
Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
---
M vdsm/storage/image.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/9098/1

diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 6ae5908..4cd9785 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -234,7 +234,7 @@
         # Otherwise move it out of the way
         newImgUUID = self.deletedVolumeName(imgUUID)
         self.log.info("Rename image %s -> %s", imgUUID, newImgUUID)
-        if not imgUUID.startswith(REMOVED_IMAGE_PREFIX):
+        if not imgUUID.startswith(sd.REMOVED_IMAGE_PREFIX):
             removedImage = os.path.join(os.path.dirname(imageDir), newImgUUID)
             os.rename(imageDir, removedImage)
         else:
@@ -242,7 +242,7 @@
 
         volumes = [volclass(self.repoPath, sdUUID, newImgUUID, volUUID) for volUUID in uuidlist]
         for vol in volumes:
-            if not vol.volUUID.startswith(REMOVED_IMAGE_PREFIX):
+            if not vol.volUUID.startswith(sd.REMOVED_IMAGE_PREFIX):
                 vol.rename(self.deletedVolumeName(vol.volUUID), recovery=False)
             else:
                 self.log.warning("Volume %s of image %s already renamed", vol.volUUID, imgUUID)


--
To view, visit http://gerrit.ovirt.org/9098
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc6ec49ff20c7f8a18ae14fe205570dfc6ce7634
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list