Francesco Romani has uploaded a new change for review. Change subject: vm: drop the display params after device creation ......................................................................
vm: drop the display params after device creation Once the devices of a Vm are been created, to keep the display* parameters in the Vm.conf only leads to confusion and more corner cases to handle, so this patch deletes them from the configuration. Change-Id: I4aa8096de1f9d798f6d42d640420efebc2e2c3b0 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/27595/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index e3faf18..198cbce 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2150,10 +2150,6 @@ del toSave['sysprepInf'] if 'floppy' in toSave: del toSave['floppy'] - if 'display' in toSave: - del toSave['display'] - if 'displayIp' in toSave: - del toSave['displayIp'] for drive in toSave.get('drives', []): for d in self._devices[DISK_DEVICES]: if isVdsmImage(d) and drive.get('volumeID') == d.volumeID: @@ -3021,6 +3017,19 @@ newDevices.extend(dev) self.conf['devices'] = newDevices + self._cleanLegacyGraphics() + + def _cleanLegacyGraphics(self): + """ + cleanup the legacy display* parameters from the Vm configuration. + """ + if 'display' in self.conf: + del self.conf['display'] + if 'displayIp' in self.conf: + del self.conf['displayIp'] + for oldName in GraphicsDevice.LEGACY_MAP: + if oldName in self.conf: + del self.conf[oldName] def _correctDiskVolumes(self, srcDomXML): """ -- To view, visit http://gerrit.ovirt.org/27595 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4aa8096de1f9d798f6d42d640420efebc2e2c3b0 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