Change in vdsm[master]: image: transform getImageDir into a function

2014-06-23 Thread iheim
Itamar Heim has posted comments on this change.

Change subject: image: transform getImageDir into a function
..


Patch Set 1:

ping

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8153cb7377d5ea353142647956ff27cda3f63b22
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: Itamar Heim ih...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: transform getImageDir into a function

2014-04-18 Thread Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.

Change subject: image: transform getImageDir into a function
..

image: transform getImageDir into a function

Change-Id: I8153cb7377d5ea353142647956ff27cda3f63b22
Signed-off-by: Federico Simoncelli fsimo...@redhat.com
---
M vdsm/storage/blockVolume.py
M vdsm/storage/fileVolume.py
M vdsm/storage/image.py
3 files changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/26919/1

diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index d9bbf15..12556d5 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -412,8 +412,8 @@
 
 Block SD supports lazy image dir creation
 
-imageDir = image.Image(self.repoPath).getImageDir(self.sdUUID,
-  self.imgUUID)
+imageDir = image.getImagePath(self.repoPath, self.sdUUID,
+  self.imgUUID)
 if not os.path.isdir(imageDir):
 try:
 os.mkdir(imageDir, 0o755)
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index f2a93d6..7d7e1ee 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -482,8 +482,8 @@
 In the file volume repositories,
 the image dir must exists after creation its first volume.
 
-imageDir = image.Image(self.repoPath).getImageDir(self.sdUUID,
-  self.imgUUID)
+imageDir = image.getImagePath(self.repoPath, self.sdUUID,
+  self.imgUUID)
 if not self.oop.os.path.isdir(imageDir):
 raise se.ImagePathError(imageDir)
 if not self.oop.os.access(imageDir, os.R_OK | os.W_OK | os.X_OK):
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 2cf8e7a..0c8232b 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -87,6 +87,10 @@
 dom.deleteImage(dom.sdUUID, imgUUID, imgVols)
 
 
+def getImagePath(repoPath, sdUUID, imgUUID):
+return os.path.join(repoPath, sdUUID, sd.DOMAIN_IMAGES, imgUUID)
+
+
 class Image:
  Actually represents a whole virtual disk.
 Consist from chain of volumes.
@@ -127,12 +131,6 @@
  [imageDir]))
 os.mkdir(imageDir)
 return imageDir
-
-def getImageDir(self, sdUUID, imgUUID):
-
-Return image directory
-
-return os.path.join(self.repoPath, sdUUID, sd.DOMAIN_IMAGES, imgUUID)
 
 def deletedVolumeName(self, uuid):
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8153cb7377d5ea353142647956ff27cda3f63b22
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli fsimo...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: transform getImageDir into a function

2014-04-18 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: image: transform getImageDir into a function
..


Patch Set 1:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8179/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8292/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7389/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8153cb7377d5ea353142647956ff27cda3f63b22
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches