Martin Polednik has uploaded a new change for review.

Change subject: hostdev: fix address type for host devices
......................................................................

hostdev: fix address type for host devices

When sending a guest address, we cannot allow empty type to be sent.
This patch fixes the type of address we send. This fixes a bug when
after starting VM again, the libvirt would fail due to unknown address
type.

Change-Id: I6d21555ec18d0e8f9766064755443785be3ef697
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/42/43042/1

diff --git a/vdsm/virt/vmdevices/hostdevice.py 
b/vdsm/virt/vmdevices/hostdevice.py
index 38b9cc4..296421b 100644
--- a/vdsm/virt/vmdevices/hostdevice.py
+++ b/vdsm/virt/vmdevices/hostdevice.py
@@ -55,7 +55,10 @@
             xml.appendChildWithArgs('boot', order=self.bootOrder)
 
         if hasattr(self, 'address'):
-            self._add_source_address(xml)
+            self._add_source_address(
+                xml,
+                type=CAPABILITY_TO_XML_ATTR[self._deviceParams['capability']]
+            )
 
         return xml
 


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

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