Change in vdsm[master]: virt: devices: video: reorganize getUnderlying

fromani at redhat.com fromani at redhat.com
Wed Dec 9 15:39:00 UTC 2015


Francesco Romani has uploaded a new change for review.

Change subject: virt: devices: video: reorganize getUnderlying
......................................................................

virt: devices: video: reorganize getUnderlying

reorder (independent) operations in getUnderlyingVideoDeviceInfo
to make it alike other getUnderlying*Info

This patch enables a future patch to factor out
some getUnderlying*Info in one helper function.

Change-Id: Ifcd3ff42bec9f95f79fae2899548a2123ed063ec
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 68fda12..5bd171e 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -4217,9 +4217,11 @@
         Obtain video devices info from libvirt.
         """
         for x in self._domain.get_device_elements('video'):
-            alias = x.getElementsByTagName('alias')[0].getAttribute('name')
-            # Get video card address
+            if not x.getElementsByTagName('address'):
+                self.log.debug('device without address: %s', x)
+                continue
             address = self._getUnderlyingDeviceAddress(x)
+            alias = x.getElementsByTagName('alias')[0].getAttribute('name')
 
             # FIXME. We have an identification problem here.
             # Video card device has not unique identifier, except the alias


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcd3ff42bec9f95f79fae2899548a2123ed063ec
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list