Change in vdsm[master]: sp: avoid masking uuid in StoragePool methods

fsimonce at redhat.com fsimonce at redhat.com
Fri Dec 6 23:10:12 UTC 2013


Federico Simoncelli has uploaded a new change for review.

Change subject: sp: avoid masking uuid in StoragePool methods
......................................................................

sp: avoid masking uuid in StoragePool methods

For some unknown reason during an unrelated refactoring these methods
began to trigger pep8 errors related to the uuid variable masking the
module with the same name.

Change-Id: I4d108e9daa42290c46faa1de3d43e8883487e83c
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/21873/2

diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 6d32f71..fd9e0ba 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1903,11 +1903,11 @@
 
         with rmanager.acquireResource(imageResourcesNamespace, imgUUID,
                                       rm.LockType.exclusive):
-            uuid = sdCache.produce(sdUUID).createVolume(
+            newVolUUID = sdCache.produce(sdUUID).createVolume(
                 imgUUID=imgUUID, size=size, volFormat=volFormat,
                 preallocate=preallocate, diskType=diskType, volUUID=volUUID,
                 desc=desc, srcImgUUID=srcImgUUID, srcVolUUID=srcVolUUID)
-        return dict(uuid=uuid)
+        return dict(uuid=newVolUUID)
 
     def deleteVolume(self, sdUUID, imgUUID, volumes, postZero, force):
         """
@@ -1972,8 +1972,8 @@
         Assumed cluster lock and that SPM is already stopped.
         """
         # Find regular (i.e. not master) domains from the pool metadata
-        regularDoms = tuple(uuid for uuid in self.getDomains()
-                            if uuid != self.masterDomain.sdUUID)
+        regularDoms = tuple(sdUUID for sdUUID in self.getDomains()
+                            if sdUUID != self.masterDomain.sdUUID)
         # The Master domain should be detached last
         for sdUUID in regularDoms:
             self.detachSD(sdUUID)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d108e9daa42290c46faa1de3d43e8883487e83c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list