Change in vdsm[master]: Live Merge: Update path using libvirt supplied value
nsoffer at redhat.com
nsoffer at redhat.com
Wed Aug 20 22:07:19 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: Live Merge: Update path using libvirt supplied value
......................................................................
Patch Set 6:
(2 comments)
http://gerrit.ovirt.org/#/c/31365/6/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 5529: if not sourceXML:
Line 5530: break
Line 5531: sourceAttr = ('file', 'dev')[drive.blockDev]
Line 5532: path = sourceXML.getAttribute(sourceAttr)
Line 5533: entry = VolumeChainEntry(pathToVolID(drive, path), path)
It would be little nicer to do:
uuid = pathToVolID(drive, path)
entry = VolumeChainEntry(uuid, path)
Line 5534: volChain.insert(0, entry)
Line 5535: bsXML = findElement(diskXML, 'backingStore')
Line 5536: if not bsXML:
Line 5537: break
Line 5585:
Line 5586: # Remove any components of the volumeChain which are no longer present
Line 5587: newChain = [x for x in device['volumeChain']
Line 5588: if x['volumeID'] in volumes]
Line 5589: device['volumeChain'] = drive.volumeChain = newChain
Can we simplify this code by using data in chain to overwrite data in device["volumeChain"] and drive.volumeChain?
Line 5590:
Line 5591: def handleBlockJobEvent(self, jobID, drive, mode):
Line 5592: if mode == 'finished':
Line 5593: self.log.info("Live merge job completed (job %s)", jobID)
--
To view, visit http://gerrit.ovirt.org/31365
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie341333ad934645c0fe4f2fd31733c459d306d9a
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list