Change in vdsm[master]: vdsm: add logging to _getUnderlyingDriveInfo

mpoledni at redhat.com mpoledni at redhat.com
Mon Oct 14 13:47:44 UTC 2013


Martin Polednik has posted comments on this change.

Change subject: vdsm: add logging to _getUnderlyingDriveInfo
......................................................................


Patch Set 4:

(1 comment)

....................................................
File vdsm/vm.py
Line 4673:                           'address': address, 'type': devType, 'boot': boot}
Line 4674: 
Line 4675:             # display indexed pairs of ordered values from 2 dicts
Line 4676:             logfunc = lambda a, b: dict((k, (v, getattr(b, k) if hasattr(b, k)
Line 4677:                                          else None)) for (k, v) in a.items())
I don't see how modifying __str__ would improve this code: the variables we care about are already in deviceDict and are currently returned in {key: (value A, value B)...} format which should be a bit more readable
Line 4678: 
Line 4679:             self.log.debug('Found drive with attributes %s', deviceDict)
Line 4680:             for d in self._devices[DISK_DEVICES]:
Line 4681:                 if d.path == devPath:


-- 
To view, visit http://gerrit.ovirt.org/19928
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I884e6b25c5bcb71ee24ad9ebad8df7c2775c5e19
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list