Change in vdsm[master]: Introduction for caching the parsed domain XML

msivak at redhat.com msivak at redhat.com
Thu Mar 20 17:25:21 UTC 2014


Martin Sivák has posted comments on this change.

Change subject: Introduction for caching the parsed domain XML
......................................................................


Patch Set 13:

(2 comments)

http://gerrit.ovirt.org/#/c/17694/13/vdsm/vm.py
File vdsm/vm.py:

Line 485:         return self._devices.getElementsByTagName(tagName)
Line 486: 
Line 487:     @property
Line 488:     def hash(self):
Line 489:         if self.devices and not self._hash:
Why not "self._hash is not None"?
Line 490:             self._hash = str(hash(self._devices.toxml()))
Line 491:         return self._hash or '0'
Line 492: 
Line 493: 


Line 487:     @property
Line 488:     def hash(self):
Line 489:         if self.devices and not self._hash:
Line 490:             self._hash = str(hash(self._devices.toxml()))
Line 491:         return self._hash or '0'
Why the or in return? Just compute the hash and save it.
Line 492: 
Line 493: 
Line 494: def eventToString(event):
Line 495:     return _EVENT_STRINGS[event]


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e106b2f2d3f4160d4e882f1a2880cb1b52fbb22
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap 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: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr 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