Change in vdsm[master]: vdsm: add functionality to detach host devices
danken at redhat.com
danken at redhat.com
Thu Oct 23 18:01:07 UTC 2014
Dan Kenigsberg has posted comments on this change.
Change subject: vdsm: add functionality to detach host devices
......................................................................
Patch Set 3:
(2 comments)
http://gerrit.ovirt.org/#/c/32389/3/vdsm/hostdev.py
File vdsm/hostdev.py:
Line 117:
Line 118: def detach(device_name):
Line 119: libvirt_device, device_params = _get_device_ref_and_params(device_name)
Line 120:
Line 121: if device_params['capability'] in _UNMANAGED_DEVICE_CAPS:
> I'd refer to http://gerrit.ovirt.org/#/c/22462/24/vdsm/virt/vm.py (it is ol
Do you expect that many users would need the semantics of "detach the device if it's pci/usb, and skip otherwise"? If so, you can
def detach_if_detachable()
that calls this detach() when needed. detach_if_detachable() can be defined here or at the user.
Line 122: libvirt_device.dettach()
Line 123:
Line 118: def detach(device_name):
Line 119: libvirt_device, device_params = _get_device_ref_and_params(device_name)
Line 120:
Line 121: if device_params['capability'] in _UNMANAGED_DEVICE_CAPS:
Line 122: libvirt_device.dettach()
the spelling mistake of dettach/detach is a sore in my eye. Could you use detachFlags(0) instead?
Line 123:
--
To view, visit http://gerrit.ovirt.org/32389
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I530fed56831314286942b8afa62900208812bfb5
Gerrit-PatchSet: 3
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: Michal Skrivanek <mskrivan 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