Milan Zamazal has posted comments on this change.

Change subject: hostdev: use libvirt flags to select capability
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/56037/4//COMMIT_MSG
Commit Message:

PS4, Line 10: capability
... capabilities ...


https://gerrit.ovirt.org/#/c/56037/4/lib/vdsm/hostdev.py
File lib/vdsm/hostdev.py:

Line 213:     """
Line 214:     devices = {}
Line 215:     flags = 0
Line 216:     if caps:
Line 217:         flags |= sum([_LIBVIRT_DEVICE_FLAGS[cap] for cap in caps])
Simple assignment should be enough here, right?  Or perhaps we can simply use

  flags = sum([_LIBVIRT_DEVICE_FLAGS[cap] for cap in caps or []])

instead of all the three lines?
Line 218:     libvirt_devices = _get_devices_from_libvirt(flags)
Line 219: 
Line 220:     for devName, params in libvirt_devices.items():
Line 221:         devices[devName] = {'params': params}


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia40fff8ba0bace1272666825d6c4fce18ac9a1f0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Milan Zamazal <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to