Francesco Romani has uploaded a new change for review. Change subject: vm: use DomainDescriptor in setTicket ......................................................................
vm: use DomainDescriptor in setTicket setTicket used to fetch and parse yet again the Domain XML. Since there is no known good reason to do so, this patch changes the code to make use of the DomainDescriptor, in order to gain a bit more of performance and of code brevity. Change-Id: I512586497209cb631e684c5f09084dcecfca0ec2 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/34545/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 8b17a03..8e221a9 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4187,8 +4187,7 @@ setTicket defaults to the first graphic device. use updateDevice to select the device. """ - graphics = _domParseStr(self._dom.XMLDesc(0)).childNodes[0]. \ - getElementsByTagName('graphics')[0] + graphics = self._domain.getDeviceElements('graphics')[0] return self._setTicketForGraphicDev( graphics, otp, seconds, connAct, params) -- To view, visit http://gerrit.ovirt.org/34545 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I512586497209cb631e684c5f09084dcecfca0ec2 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