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

nsoffer at redhat.com nsoffer at redhat.com
Thu Jun 26 11:06:40 UTC 2014


Nir Soffer has posted comments on this change.

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


Patch Set 18:

(2 comments)

Nice, needs little cleanup.

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

Line 1855:             self.conf['vmName'] = 'n%s' % self.id
Line 1856:         self._guestSocketFile = self._makeChannelPath(_VMCHANNEL_DEVICE_NAME)
Line 1857:         self._qemuguestSocketFile = self._makeChannelPath(_QEMU_GA_DEVICE_NAME)
Line 1858:         self._lastXMLDesc = DomainDescriptor(
Line 1859:             '<domain><uuid>%s</uuid></domain>' % self.id)
Lets move this hack into domaindescrioptor module and call it something like emptyDescriptor or something like that.

Will clean the code here:

    self._lastXMLDesc = DomainDescriptor.fromId(self.id)
Line 1860:         self._released = False
Line 1861:         self._releaseLock = threading.Lock()
Line 1862:         self.saveState()
Line 1863:         self._watchdogEvent = {}


Line 4659:         except Exception:
Line 4660:             pass
Line 4661:         return pid
Line 4662: 
Line 4663:     def _getUnderlyingVmInfo(self):
This does not get anything.

Lets rename to setupUnderlyingVmInfo, or maye more specific like parseDomainXML
Line 4664:         domainXML = self._dom.XMLDesc(0)
Line 4665:         self._lastXMLDesc = DomainDescriptor(domainXML)
Line 4666: 
Line 4667:     def _ejectFloppy(self):


-- 
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: 18
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: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <svinota.saveliev at gmail.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