Martin Polednik has uploaded a new change for review.

Change subject: hostdev: add reattach method to HostDevice
......................................................................

hostdev: add reattach method to HostDevice

Reattaching of a device can now be done via reattach_detachable
function in hostdev module. The new method allows device object to call
this directly, without having to supply the name. This can be used in
further patches to simplify reattaching of the devices.

Change-Id: If3f1aa5d958fb388b04003860c2083cc0838a4bb
Signed-off-by: Martin Polednik <mpoled...@redhat.com>
---
M vdsm/virt/vmdevices/hostdevice.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/43774/1

diff --git a/vdsm/virt/vmdevices/hostdevice.py 
b/vdsm/virt/vmdevices/hostdevice.py
index 976a66b..6d62fa0 100644
--- a/vdsm/virt/vmdevices/hostdevice.py
+++ b/vdsm/virt/vmdevices/hostdevice.py
@@ -20,7 +20,7 @@
 
 from vdsm import utils
 from hostdev import get_device_params, detach_detachable, \
-    CAPABILITY_TO_XML_ATTR
+    reattach_detachable, CAPABILITY_TO_XML_ATTR
 from . import core
 from . import hwclass
 
@@ -68,6 +68,9 @@
         self._deviceParams = detach_detachable(self.device)
         self.hostAddress = self._update_address(self.hostAddress)
 
+    def reattach(self):
+        reattach_detachable(self.device)
+
     def getXML(self):
         if any((self.macAddr, self.vlanId)):
             xml = self._create_network_interface_xml()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3f1aa5d958fb388b04003860c2083cc0838a4bb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoled...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to