Adam Litke has uploaded a new change for review.

Change subject: storage constants: Move LEASE_FILEEXT
......................................................................

storage constants: Move LEASE_FILEEXT

Change-Id: I80c741d34c6441de2474bf7c5ce4d5ea5a725995
Signed-off-by: Adam Litke <ali...@redhat.com>
---
M vdsm/storage/constants.py
M vdsm/storage/fileSD.py
M vdsm/storage/fileVolume.py
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/50841/1

diff --git a/vdsm/storage/constants.py b/vdsm/storage/constants.py
index c9070f2..c146453 100644
--- a/vdsm/storage/constants.py
+++ b/vdsm/storage/constants.py
@@ -22,6 +22,7 @@
 SECTOR_SIZE = 512
 
 FILE_VOLUME_PERMISSIONS = 0o660
+LEASE_FILEEXT = ".lease"
 
 # Temporary volume indicators
 TEMP_VOL_FILEEXT = ".tmp"        # Appended to FileVolume metadata filenames
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index ec24d35..965af12 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -39,6 +39,8 @@
 from vdsm import supervdsm
 import mount
 
+from storage.constants import LEASE_FILEEXT
+
 REMOTE_PATH = "REMOTE_PATH"
 
 FILE_SD_MD_FIELDS = sd.SD_MD_FIELDS.copy()
@@ -463,7 +465,7 @@
         if self.hasVolumeLeases():
             vol = self.produceVolume(imgUUID, volUUID)
             volumePath = vol.getVolumePath()
-            leasePath = volumePath + fileVolume.LEASE_FILEEXT
+            leasePath = volumePath + LEASE_FILEEXT
             return leasePath, fileVolume.LEASE_FILEOFFSET
         return None, None
 
@@ -669,7 +671,7 @@
         basePath = os.path.join(repoPath, self.sdUUID, sd.DOMAIN_IMAGES)
         volFiles = [volUUID, volUUID + fileVolume.META_FILEEXT]
         if self.hasVolumeLeases():
-            volFiles.append(volUUID + fileVolume.LEASE_FILEEXT)
+            volFiles.append(volUUID + LEASE_FILEEXT)
         for rImg in relinkImgs:
             # This function assumes that all relevant images and template
             # namespaces are locked.
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index 79ecc60..9eb0173 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -37,9 +37,9 @@
 from threadLocal import vars
 
 from storage.constants import FILE_VOLUME_PERMISSIONS
+from storage.constants import LEASE_FILEEXT
 
 META_FILEEXT = ".meta"
-LEASE_FILEEXT = ".lease"
 LEASE_FILEOFFSET = 0
 
 BLOCK_SIZE = volume.BLOCK_SIZE


-- 
To view, visit https://gerrit.ovirt.org/50841
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80c741d34c6441de2474bf7c5ce4d5ea5a725995
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <ali...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to