Change in vdsm[master]: move logUtils to lib

ybronhei at redhat.com ybronhei at redhat.com
Tue Feb 23 11:46:37 UTC 2016


Yaniv Bronhaim has uploaded a new change for review.

Change subject: move logUtils to lib
......................................................................

move logUtils to lib

Change-Id: I39b833ff5746db7a764ab9d9120e73a083d14365
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M debian/vdsm-python.install
M debian/vdsm.install
M lib/vdsm/Makefile.am
R lib/vdsm/logUtils.py
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/storage/hsm.py
M vdsm/storage/misc.py
M vdsm/storage/resourceManager.py
M vdsm/storage/task.py
M vdsm/virt/vm.py
11 files changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/53889/1

diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install
index b882c4d..c7e99af 100644
--- a/debian/vdsm-python.install
+++ b/debian/vdsm-python.install
@@ -20,6 +20,7 @@
 ./usr/lib/python2.7/dist-packages/vdsm/ipwrapper.py
 ./usr/lib/python2.7/dist-packages/vdsm/jsonrpcvdscli.py
 ./usr/lib/python2.7/dist-packages/vdsm/kernelconfig.py
+./usr/lib/python2.7/dist-packages/vdsm/logUtils.py
 ./usr/lib/python2.7/dist-packages/vdsm/libvirtconnection.py
 ./usr/lib/python2.7/dist-packages/vdsm/netconfpersistence.py
 ./usr/lib/python2.7/dist-packages/vdsm/netinfo/__init__.py
diff --git a/debian/vdsm.install b/debian/vdsm.install
index 2041fd1..6b5926e 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -45,7 +45,6 @@
 ./usr/share/vdsm/hooking.py
 ./usr/share/vdsm/jobs.py
 ./usr/share/vdsm/kaxmlrpclib.py
-./usr/share/vdsm/logUtils.py
 ./usr/share/vdsm/mk_sysprep_floppy
 ./usr/share/vdsm/mkimage.py
 ./usr/share/vdsm/momIF.py
diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am
index 4180eba..72607b1 100644
--- a/lib/vdsm/Makefile.am
+++ b/lib/vdsm/Makefile.am
@@ -44,6 +44,7 @@
 	jsonrpcvdscli.py \
 	kernelconfig.py \
 	libvirtconnection.py \
+	logUtils.py \
 	m2cutils.py \
 	netconfpersistence.py \
 	panic.py \
diff --git a/vdsm/logUtils.py b/lib/vdsm/logUtils.py
similarity index 99%
rename from vdsm/logUtils.py
rename to lib/vdsm/logUtils.py
index f3847ed..5a651c9 100644
--- a/vdsm/logUtils.py
+++ b/lib/vdsm/logUtils.py
@@ -17,6 +17,7 @@
 #
 # Refer to the README and COPYING files for full details of the license
 #
+from __future__ import absolute_import
 
 import grp
 import logging
diff --git a/vdsm.spec.in b/vdsm.spec.in
index e56ed5e..2f60cbf 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -899,7 +899,6 @@
 %{_sysconfdir}/sudoers.d/50_vdsm
 %{_sysconfdir}/cron.hourly/vdsm-logrotate
 %{_sysconfdir}/libvirt/hooks/qemu
-%{_datadir}/%{vdsm_name}/logUtils.py*
 %{_libexecdir}/%{vdsm_name}/curl-img-wrap
 %{_libexecdir}/%{vdsm_name}/fc-scan
 %{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks
@@ -1102,6 +1101,7 @@
 %{python_sitelib}/%{vdsm_name}/jobs.py*
 %{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py*
 %{python_sitelib}/%{vdsm_name}/kernelconfig.py*
+%{python_sitelib}/%{vdsm_name}/logUtils.py*
 %{python_sitelib}/%{vdsm_name}/libvirtconnection.py*
 %{python_sitelib}/%{vdsm_name}/m2cutils.py*
 %{python_sitelib}/%{vdsm_name}/netinfo/__init__.py*
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 6249030..a292f56 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -28,7 +28,6 @@
 	clientIF.py \
 	hooking.py \
 	kaxmlrpclib.py \
-	logUtils.py \
 	mkimage.py \
 	momIF.py \
 	numaUtils.py \
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 27c9950..019fb8c 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -37,6 +37,7 @@
 import stat
 
 from vdsm import concurrent
+from vdsm import logUtils
 from vdsm.config import config
 import sp
 from spbackends import MAX_POOL_DESCRIPTION_SIZE, MAX_DOMAINS
@@ -67,7 +68,6 @@
 import resourceManager as rm
 from resourceFactories import IMAGE_NAMESPACE
 import devicemapper
-import logUtils
 import mount
 import dispatcher
 import storageServer
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index f9b3865..c9508d2 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -49,9 +49,9 @@
 from vdsm import commands
 from vdsm import concurrent
 from vdsm import constants
+from vdsm import logUtils
 from vdsm import utils
 import storage_exception as se
-import logUtils
 
 from storage.constants import SECTOR_SIZE
 
diff --git a/vdsm/storage/resourceManager.py b/vdsm/storage/resourceManager.py
index 0b9f848..7365833 100644
--- a/vdsm/storage/resourceManager.py
+++ b/vdsm/storage/resourceManager.py
@@ -29,7 +29,7 @@
 
 import storage_exception as se
 import misc
-from logUtils import SimpleLogAdapter
+from vdsm.logUtils import SimpleLogAdapter
 from vdsm import concurrent
 from vdsm import utils
 
diff --git a/vdsm/storage/task.py b/vdsm/storage/task.py
index c558e0e..a4cc97e 100644
--- a/vdsm/storage/task.py
+++ b/vdsm/storage/task.py
@@ -60,8 +60,8 @@
 from weakref import proxy
 from vdsm import concurrent
 from vdsm.config import config
+from vdsm.logUtils import SimpleLogAdapter
 import outOfProcess as oop
-from logUtils import SimpleLogAdapter
 
 
 getProcPool = oop.getGlobalProcPool
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 7dfaf51..cfaf22a 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -51,6 +51,7 @@
 from vdsm.compat import pickle
 from vdsm.config import config
 from vdsm.define import ERROR, NORMAL, doneCode, errCode
+from vdsm.logUtils import SimpleLogAdapter
 from vdsm.netinfo import DUMMY_BRIDGE
 from storage import outOfProcess as oop
 from storage import sd
@@ -58,7 +59,6 @@
 
 # local imports
 # In future those should be imported via ..
-from logUtils import SimpleLogAdapter
 import caps
 import numaUtils
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39b833ff5746db7a764ab9d9120e73a083d14365
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list