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

frolland at redhat.com frolland at redhat.com
Mon Mar 7 13:37:14 UTC 2016


Hello Fred Rolland,

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

    https://gerrit.ovirt.org/54424

to review the following change.

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

storage: Move securable module to site-packages

Moving vdsm/storage/securable.py to lib/vdsm/storage/securable.py.

Change-Id: Ibe50f4ea10a9b4bb7511ed1c373a33421daf295d
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/securable.py
M tests/securableTests.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/sp.py
M vdsm/storage/spbackends.py
M vdsm/storage/storage_exception.py
10 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/54424/1

diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install
index 82945dc..517854b 100644
--- a/debian/vdsm-python.install
+++ b/debian/vdsm-python.install
@@ -60,6 +60,7 @@
 ./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/storage/securable.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 5318d47..a709a3d 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -111,7 +111,6 @@
 ./usr/share/vdsm/storage/resourceManager.py
 ./usr/share/vdsm/storage/sd.py
 ./usr/share/vdsm/storage/sdc.py
-./usr/share/vdsm/storage/securable.py
 ./usr/share/vdsm/storage/sp.py
 ./usr/share/vdsm/storage/spbackends.py
 ./usr/share/vdsm/storage/storageServer.py
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index 8ffdec5..ce71476 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -24,5 +24,5 @@
 dist_vdsmstorage_PYTHON = \
 	__init__.py \
 	constants.py \
+	securable.py \
 	$(NULL)
-
diff --git a/vdsm/storage/securable.py b/lib/vdsm/storage/securable.py
similarity index 98%
rename from vdsm/storage/securable.py
rename to lib/vdsm/storage/securable.py
index d9de57b..a2103f6 100644
--- a/vdsm/storage/securable.py
+++ b/lib/vdsm/storage/securable.py
@@ -18,6 +18,7 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
+from __future__ import absolute_import
 import inspect
 from functools import wraps
 
diff --git a/tests/securableTests.py b/tests/securableTests.py
index 0c03434..7a3993c 100644
--- a/tests/securableTests.py
+++ b/tests/securableTests.py
@@ -18,7 +18,7 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
-from storage.securable import secured, SecureError, unsecured
+from vdsm.storage.securable import secured, SecureError, unsecured
 from testlib import VdsmTestCase as TestCaseBase
 
 
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 0640cb6..e3858b3 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -945,7 +945,6 @@
 %{_datadir}/%{vdsm_name}/storage/clusterlock.py*
 %{_datadir}/%{vdsm_name}/storage/sdc.py*
 %{_datadir}/%{vdsm_name}/storage/sd.py*
-%{_datadir}/%{vdsm_name}/storage/securable.py*
 %{_datadir}/%{vdsm_name}/storage/sp.py*
 %{_datadir}/%{vdsm_name}/storage/spbackends.py*
 %{_datadir}/%{vdsm_name}/storage/storage_exception.py*
@@ -1146,6 +1145,7 @@
 %{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}/storage/securable.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 10106e6..39c3575 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -58,7 +58,6 @@
 	resourceManager.py \
 	sdc.py \
 	sd.py \
-	securable.py \
 	sp.py \
 	spbackends.py \
 	storage_exception.py \
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 57a0d4f..7820a72 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -41,10 +41,10 @@
 import misc
 import fileUtils
 from vdsm.config import config
+from vdsm.storage.securable import secured, unsecured
 from sdc import sdCache
 import storage_exception as se
 from remoteFileHandler import Timeout
-from securable import secured, unsecured
 import image
 from resourceFactories import IMAGE_NAMESPACE
 import resourceManager as rm
diff --git a/vdsm/storage/spbackends.py b/vdsm/storage/spbackends.py
index 39d76b6..b7592c1 100644
--- a/vdsm/storage/spbackends.py
+++ b/vdsm/storage/spbackends.py
@@ -29,13 +29,13 @@
 from persistentDict import DictValidator
 from persistentDict import unicodeDecoder
 from persistentDict import unicodeEncoder
-from securable import secured
-from securable import unsecured
 from sp import LVER_INVALID
 from sp import SPM_ACQUIRED
 from sp import SPM_FREE
 from sp import SPM_ID_FREE
 from vdsm.config import config
+from vdsm.storage.securable import secured
+from vdsm.storage.securable import unsecured
 
 
 MAX_POOL_DESCRIPTION_SIZE = 50
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index b01b6f5..694214a8 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -31,8 +31,8 @@
 #
 #######################################################
 
-from securable import SecureError
 from vdsm.exception import GeneralException
+from vdsm.storage.securable import SecureError
 SPM_STATUS_ERROR = (654, "Not SPM")
 
 GENERAL_EXCEPTION = lambda e: (100, str(e))


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe50f4ea10a9b4bb7511ed1c373a33421daf295d
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