Francesco Romani has uploaded a new change for review. Change subject: vm: devices: replace Memory device info ......................................................................
vm: devices: replace Memory device info Change-Id: Ib84395d01736223d2a1c1f45ec48334cebcb5240 Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/virt/vm.py 1 file changed, 1 insertion(+), 22 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/50197/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 378fd4c..cceab3d 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4410,28 +4410,7 @@ self.conf['devices'].append(nicDev) def _getUnderlyingMemoryDeviceInfo(self): - """ - Obtain memory device info from libvirt. - """ - for x in self._domain.get_device_elements('memory'): - 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 mem in self._devices[hwclass.MEMORY]: - if not hasattr(mem, 'address') or not hasattr(mem, 'alias'): - mem.alias = alias - mem.address = address - break - # Update vm's conf with address - for dev in self.conf['devices']: - if ((dev['type'] == hwclass.MEMORY) and - (not dev.get('address') or not dev.get('alias'))): - dev['address'] = address - dev['alias'] = alias - break + self._getUnderlyingDeviceInfo(hwclass.MEMORY) self.conf['memSize'] = self._domain.get_memory_size() def _setWriteWatermarks(self): -- To view, visit https://gerrit.ovirt.org/50197 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib84395d01736223d2a1c1f45ec48334cebcb5240 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
