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 <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Ido Barkan <[email protected]> Gerrit-Reviewer: Martin Betak <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
