Change in vdsm[master]: move hostdev to lib

ybronhei at redhat.com ybronhei at redhat.com
Tue Feb 23 08:28:26 UTC 2016


Yaniv Bronhaim has uploaded a new change for review.

Change subject: move hostdev to lib
......................................................................

move hostdev to lib

Change-Id: Ic37e635ce027496f112272a313732baf20b44997
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/hostdev.py
M tests/hostdevTests.py
M vdsm.spec.in
M vdsm/API.py
M vdsm/Makefile.am
M vdsm/vdsm-restore-net-config
M vdsm/virt/vm.py
10 files changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/53873/1

diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install
index 3bf64e1..b882c4d 100644
--- a/debian/vdsm-python.install
+++ b/debian/vdsm-python.install
@@ -16,6 +16,7 @@
 ./usr/lib/python2.7/dist-packages/vdsm/executor.py
 ./usr/lib/python2.7/dist-packages/vdsm/health.py
 ./usr/lib/python2.7/dist-packages/vdsm/hooks.py
+./usr/lib/python2.7/dist-packages/vdsm/hostdev.py
 ./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
diff --git a/debian/vdsm.install b/debian/vdsm.install
index 9e9482f..2041fd1 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -43,7 +43,6 @@
 ./usr/share/vdsm/gluster/cli.py
 ./usr/share/vdsm/gluster/exception.py
 ./usr/share/vdsm/hooking.py
-./usr/share/vdsm/hostdev.py
 ./usr/share/vdsm/jobs.py
 ./usr/share/vdsm/kaxmlrpclib.py
 ./usr/share/vdsm/logUtils.py
diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am
index effd523..4180eba 100644
--- a/lib/vdsm/Makefile.am
+++ b/lib/vdsm/Makefile.am
@@ -38,6 +38,7 @@
 	health.py \
 	hooks.py \
 	host.py \
+	hostdev.py \
 	ipwrapper.py \
 	jobs.py \
 	jsonrpcvdscli.py \
diff --git a/vdsm/hostdev.py b/lib/vdsm/hostdev.py
similarity index 99%
rename from vdsm/hostdev.py
rename to lib/vdsm/hostdev.py
index 89c5366..5ab5ba8 100644
--- a/vdsm/hostdev.py
+++ b/lib/vdsm/hostdev.py
@@ -17,6 +17,8 @@
 #
 # Refer to the README and COPYING files for full details of the license
 #
+from __future__ import absolute_import
+
 
 import xml.etree.ElementTree as etree
 
diff --git a/tests/hostdevTests.py b/tests/hostdevTests.py
index 02518fe..f28a446 100644
--- a/tests/hostdevTests.py
+++ b/tests/hostdevTests.py
@@ -19,7 +19,6 @@
 #
 
 
-import hostdev
 import vmfakelib as fake
 
 from virt.vmdevices import hostdevice, network, hwclass
@@ -29,6 +28,7 @@
 from monkeypatch import MonkeyClass
 
 from vdsm import hooks
+from vdsm import hostdev
 from vdsm import libvirtconnection
 
 _PCI_DEVICES = ['pci_0000_00_1a_0', 'pci_0000_00_1f_2', 'pci_0000_00_02_0',
diff --git a/vdsm.spec.in b/vdsm.spec.in
index a5d300b..e56ed5e 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -848,7 +848,6 @@
 %{_datadir}/%{vdsm_name}/daemonAdapter
 %{_datadir}/%{vdsm_name}/API.py*
 %{_datadir}/%{vdsm_name}/hooking.py*
-%{_datadir}/%{vdsm_name}/hostdev.py*
 %{_datadir}/%{vdsm_name}/mk_sysprep_floppy
 %{_datadir}/%{vdsm_name}/parted_utils.py*
 %{_datadir}/%{vdsm_name}/mkimage.py*
@@ -1098,6 +1097,7 @@
 %{python_sitelib}/%{vdsm_name}/health.py*
 %{python_sitelib}/%{vdsm_name}/hooks.py*
 %{python_sitelib}/%{vdsm_name}/host.py*
+%{python_sitelib}/%{vdsm_name}/hostdev.py*
 %{python_sitelib}/%{vdsm_name}/ipwrapper.py*
 %{python_sitelib}/%{vdsm_name}/jobs.py*
 %{python_sitelib}/%{vdsm_name}/jsonrpcvdscli.py*
diff --git a/vdsm/API.py b/vdsm/API.py
index 479c00b..0155ca4 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -37,6 +37,7 @@
 from vdsm import constants
 from vdsm import exception
 from vdsm import hooks
+from vdsm import hostdev
 from vdsm import response
 from vdsm import supervdsm
 from vdsm import jobs
@@ -56,7 +57,6 @@
 from vdsm.define import doneCode, errCode, Kbytes, Mbytes
 import caps
 from vdsm.config import config
-import hostdev
 from caps import PAGE_SIZE_BYTES
 
 
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 9ebecf5..6249030 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -27,7 +27,6 @@
 	caps.py \
 	clientIF.py \
 	hooking.py \
-	hostdev.py \
 	kaxmlrpclib.py \
 	logUtils.py \
 	mkimage.py \
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 76e2d4b..bea37c2 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -30,6 +30,7 @@
 
 from vdsm.config import config
 from vdsm import ipwrapper
+from vdsm import hostdev
 from vdsm.netinfo import nics, misc
 from vdsm.netinfo.cache import CachingNetInfo
 from vdsm import kernelconfig
@@ -37,7 +38,6 @@
 from vdsm.netconfpersistence import RunningConfig, PersistentConfig, \
     CONF_PERSIST_DIR, BaseConfig
 from vdsm.utils import monotonic_time
-import hostdev
 
 # Ifcfg persistence restoration
 from vdsm.network.configurators import ifcfg
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index df58d1b..7dfaf51 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -41,6 +41,7 @@
 from vdsm import cpuarch
 from vdsm import host
 from vdsm import hooks
+from vdsm import hostdev
 from vdsm import libvirtconnection
 from vdsm import netinfo
 from vdsm import qemuimg
@@ -59,7 +60,6 @@
 # In future those should be imported via ..
 from logUtils import SimpleLogAdapter
 import caps
-import hostdev
 import numaUtils
 
 # local package imports


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

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