Dan Kenigsberg has posted comments on this change.
Change subject: Live Merge: Get volume chain for multiple drives
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.ovirt.org/#/c/31366/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 5509: ret = {}
Line 5510: domXML = self._getUnderlyingVmInfo()
Line 5511: for drive in drives:
Line 5512: alias = drive['alias']
Line 5513: diskXML = lookupDeviceXMLByAlias(domXML, alias)
Complexity is not a very big deal here, but n^2 iterations of drives is not so pretty.
It would be nicer to extract the needed info from device xmls once, put it in a temporary
lookup, and build the returned chain afterword.
A nice bonus would be splitting xml-parsing code from the merge logic.
(I'm not sure that this worth a delay of the this patch; this improvement can wait for
a followup).
Line 5514: if not diskXML:
Line 5515: continue
Line 5516: volChain = []
Line 5517: while True:
--
To view, visit
http://gerrit.ovirt.org/31366
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I93d5a641b0814e3764c70bea8a6c1910a821adcc
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes