Change in vdsm[master]: storage: Move constants module to site-packages

frolland at redhat.com frolland at redhat.com
Mon Mar 7 09:40:16 UTC 2016


Hello Fred Rolland,

I'd like you to do a code review.  Please visit

    https://gerrit.ovirt.org/54404

to review the following change.

Change subject: storage: Move constants module to site-packages
......................................................................

storage: Move constants module to site-packages

Moving vsdm/storage/constants.py to lib/vdsm/storage/constants.py.

Change-Id: I413e0b54de0d06f7eee3ecb4094f0281bb77dc51
Signed-off-by: Fred Rolland <frolland at redhat.com>
---
M debian/vdsm-python.install
M debian/vdsm.install
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/constants.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/fileSD.py
M vdsm/storage/fileVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/misc.py
M vdsm/storage/sp.py
11 files changed, 13 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/54404/1

diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install
index 7752649..82945dc 100644
--- a/debian/vdsm-python.install
+++ b/debian/vdsm-python.install
@@ -59,6 +59,7 @@
 ./usr/lib/python2.7/dist-packages/vdsm/sslcompat.py
 ./usr/lib/python2.7/dist-packages/vdsm/sslutils.py
 ./usr/lib/python2.7/dist-packages/vdsm/storage/__init__.py
+./usr/lib/python2.7/dist-packages/vdsm/storage/constants.py
 ./usr/lib/python2.7/dist-packages/vdsm/supervdsm.py
 ./usr/lib/python2.7/dist-packages/vdsm/taskset.py
 ./usr/lib/python2.7/dist-packages/vdsm/tool/__init__.py
diff --git a/debian/vdsm.install b/debian/vdsm.install
index a9c197b..5318d47 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -78,7 +78,6 @@
 ./usr/share/vdsm/storage/blockSD.py
 ./usr/share/vdsm/storage/blockVolume.py
 ./usr/share/vdsm/storage/clusterlock.py
-./usr/share/vdsm/storage/constants.py
 ./usr/share/vdsm/storage/curlImgWrap.py
 ./usr/share/vdsm/storage/devicemapper.py
 ./usr/share/vdsm/storage/dispatcher.py
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index c05cf54..8ffdec5 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -23,4 +23,6 @@
 
 dist_vdsmstorage_PYTHON = \
 	__init__.py \
+	constants.py \
 	$(NULL)
+
diff --git a/vdsm/storage/constants.py b/lib/vdsm/storage/constants.py
similarity index 96%
rename from vdsm/storage/constants.py
rename to lib/vdsm/storage/constants.py
index 78db1f0..0b0b13d 100644
--- a/vdsm/storage/constants.py
+++ b/lib/vdsm/storage/constants.py
@@ -18,6 +18,8 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
+from __future__ import absolute_import
+
 STORAGE = "Storage"
 SECTOR_SIZE = 512
 
diff --git a/vdsm.spec.in b/vdsm.spec.in
index c31e586..0640cb6 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -913,7 +913,6 @@
 %{_datadir}/%{vdsm_name}/storage/__init__.py*
 %{_datadir}/%{vdsm_name}/storage/blockSD.py*
 %{_datadir}/%{vdsm_name}/storage/blockVolume.py*
-%{_datadir}/%{vdsm_name}/storage/constants.py*
 %{_datadir}/%{vdsm_name}/storage/curlImgWrap.py*
 %{_datadir}/%{vdsm_name}/storage/devicemapper.py*
 %{_datadir}/%{vdsm_name}/storage/dispatcher.py*
@@ -1146,6 +1145,7 @@
 %{python_sitelib}/%{vdsm_name}/profiling/memory.py*
 %{python_sitelib}/%{vdsm_name}/profiling/profile.py*
 %{python_sitelib}/%{vdsm_name}/storage/__init__.py*
+%{python_sitelib}/%{vdsm_name}/storage/constants.py*
 %{python_sitelib}/%{vdsm_name}/tc/__init__.py*
 %{python_sitelib}/%{vdsm_name}/tc/_parser.py*
 %{python_sitelib}/%{vdsm_name}/tc/_wrapper.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index 05ef838..10106e6 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -28,7 +28,6 @@
 	blockSD.py \
 	blockVolume.py \
 	clusterlock.py \
-	constants.py \
 	curlImgWrap.py \
 	devicemapper.py \
 	dispatcher.py \
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index b16ed72..04b0165 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -39,7 +39,7 @@
 from vdsm import supervdsm
 import mount
 
-from storage.constants import LEASE_FILEEXT
+from vdsm.storage.constants import LEASE_FILEEXT
 
 REMOTE_PATH = "REMOTE_PATH"
 
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index a50d7fa..57d1fe0 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -37,8 +37,8 @@
 import task
 from threadLocal import vars
 
-from storage.constants import FILE_VOLUME_PERMISSIONS
-from storage.constants import LEASE_FILEEXT
+from vdsm.storage.constants import FILE_VOLUME_PERMISSIONS
+from vdsm.storage.constants import LEASE_FILEEXT
 
 META_FILEEXT = ".meta"
 LEASE_FILEOFFSET = 0
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 019fb8c..a0716cc 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -75,8 +75,8 @@
 from vdsm import utils
 from vdsm import qemuimg
 
-from storage.constants import STORAGE
-from storage.constants import SECTOR_SIZE
+from vdsm.storage.constants import STORAGE
+from vdsm.storage.constants import SECTOR_SIZE
 
 GUID = "guid"
 NAME = "name"
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index c9508d2..0caf2fd 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -53,7 +53,7 @@
 from vdsm import utils
 import storage_exception as se
 
-from storage.constants import SECTOR_SIZE
+from vdsm.storage.constants import SECTOR_SIZE
 
 IOUSER = "vdsm"
 DIRECTFLAG = "direct"
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 5c1a42f..57a0d4f 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -51,7 +51,7 @@
 import volume
 import mount
 
-from storage.constants import STORAGE
+from vdsm.storage.constants import STORAGE
 
 POOL_MASTER_DOMAIN = 'mastersd'
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I413e0b54de0d06f7eee3ecb4094f0281bb77dc51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>


More information about the vdsm-patches mailing list