Francesco Romani has uploaded a new change for review. Change subject: vm: devices: replace Watchdog device info ......................................................................
vm: devices: replace Watchdog device info Change-Id: I2939babe4d55ebd4f8611233b1041167cef8054d Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 1 insertion(+), 23 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/50194/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 78eb413..da9d6cd 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -1700,7 +1700,7 @@ self._getUnderlyingGraphicsDeviceInfo() self._getUnderlyingControllerDeviceInfo() self._getUnderlyingBalloonDeviceInfo() - self._getUnderlyingWatchdogDeviceInfo() + self._getUnderlyingDeviceInfo(hwclass.WATCHDOG) self._getUnderlyingDeviceInfo(hwclass.SMARTCARD) self._getUnderlyingRngDeviceInfo() self._getUnderlyingConsoleDeviceInfo() @@ -4189,28 +4189,6 @@ 'alias': alias, 'address': address} self.conf['devices'].append(hostdevice) - - def _getUnderlyingWatchdogDeviceInfo(self): - """ - Obtain watchdog device info from libvirt. - """ - for x in self._domain.get_device_elements('watchdog'): - if not x.getElementsByTagName('address'): - self.log.debug('device without address: %s', x) - continue - address = self._getUnderlyingDeviceAddress(x) - alias = x.getElementsByTagName('alias')[0].getAttribute('name') - - for wd in self._devices[hwclass.WATCHDOG]: - if not hasattr(wd, 'address') or not hasattr(wd, 'alias'): - wd.address = address - wd.alias = alias - - for dev in self.conf['devices']: - if ((dev['type'] == hwclass.WATCHDOG) and - (not dev.get('address') or not dev.get('alias'))): - dev['address'] = address - dev['alias'] = alias def _getUnderlyingVideoDeviceInfo(self): """ -- To view, visit https://gerrit.ovirt.org/50194 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2939babe4d55ebd4f8611233b1041167cef8054d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches