Change in vdsm[master]: hostdev: add hostdev device definition

danken at redhat.com danken at redhat.com
Tue Feb 24 12:45:40 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: hostdev: add hostdev device definition
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/37700/2/vdsm/virt/vmdevices/hostdevice.py
File vdsm/virt/vmdevices/hostdevice.py:

Line 8: 
Line 9:     def __init__(self, conf, log, **kwargs):
Line 10:         super(HostDevice, self).__init__(conf, log, **kwargs)
Line 11: 
Line 12:         self._deviceParams = detach_detachable(self.device)
__init__ is going to be called during recovery flow, too, where we should not call detach (again) as the device is already owned by the VM.
Line 13: 
Line 14:     def getXML(self):
Line 15:         hostdev = self.createXmlElem(hwclass.HOSTDEV, None)
Line 16:         hostdev.setAttrs(managed='no', mode='subsystem',


Line 10:         super(HostDevice, self).__init__(conf, log, **kwargs)
Line 11: 
Line 12:         self._deviceParams = detach_detachable(self.device)
Line 13: 
Line 14:     def getXML(self):
please add a nice docstring of the expected xml, as in other devices
Line 15:         hostdev = self.createXmlElem(hwclass.HOSTDEV, None)
Line 16:         hostdev.setAttrs(managed='no', mode='subsystem',
Line 17:                          type=self._deviceParams['capability'])
Line 18:         source = hostdev.appendChildWithArgs('source')


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I51f6713cf76914d8626718071598421bc1731722
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak 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