Change in vdsm[master]: vdsm: introduce hostdev module

danken at redhat.com danken at redhat.com
Sun Sep 14 22:55:52 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: vdsm: introduce hostdev module
......................................................................


Patch Set 7:

(2 comments)

http://gerrit.ovirt.org/#/c/32313/7/vdsm/hostdev.py
File vdsm/hostdev.py:

Line 64:             if device['device'] == 'hostdev':
Line 65:                 try:
Line 66:                     devices[device['name']] = vmId
Line 67:                 except KeyError:
Line 68:                     # VM has device which is no (longer) present
We have two dictionary lookup inside the try-block. It's safer two have only one.
Line 69:                     # on the host - althought this should be handled by
Line 70:                     # user, warning can help debugging libvirt errors
Line 71:                     logging.warning('VM %s has device %s which is not '
Line 72:                                     'available!', vmId, device['name'])


Line 84:                 for device in libvirtconnection.get().listAllDevices(0))
Line 85: 
Line 86: 
Line 87: def list_by_caps(vmContainer, caps=None):
Line 88:     """
please explain what is the expected value of caps.
Line 89:     Returns devices that have specified capability in format
Line 90:     {device_name: {'params': {'capability': '', 'vendor': '',
Line 91:                               'vendor_id': '', 'product': '',
Line 92:                               'product_id': '', 'iommu_group': ''},


-- 
To view, visit http://gerrit.ovirt.org/32313
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2bba96db5be180d00cb74fb89b10c5b09e5bd180
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list