Change in vdsm[master]: Move VM logic to it's own module (pt.1)

agl at us.ibm.com agl at us.ibm.com
Wed Aug 29 18:09:50 UTC 2012


Adam Litke has posted comments on this change.

Change subject: Move VM logic to it's own module (pt.1)
......................................................................


Patch Set 4: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File vdsm/API.py
Line 134: 
Line 135:         for methName in GUEST_AGENT_METHODS:
Line 136:             self.setattr(attrName, partial(guestTrampoline, methName))
Line 137: 
Line 138:     def _runThinMethod(self, methodName, *args, **kwargs):
Is all of the above strictly necessary?  What's wrong with just keeping around the straightforward albeit slightly more verbose standard methods.  Much of the reason that vdsm code is so hard to understand is because each module has a different form of dynamic function generation.  It's just not worth the complexity in order to save a few lines of code.
Line 139:         v = self._cif.vmContainer.get(self._UUID)
Line 140:         if not v:
Line 141:             return errCode['noVM']
Line 142: 


....................................................
File vdsm/vmContainer.py
Line 19:         self._vms = {}
Line 20: 
Line 21:     def createVm(self, vmParams):
Line 22:         vmId = vmParams['vmId']
Line 23:         self.log.info("vmContainerLock acquired by vm %s", vmId)
It hasn't been acquired yet
Line 24: 
Line 25:         with self._syncRoot:
Line 26:             if 'recover' not in vmParams:
Line 27:                 if vmId in self._vms:


Line 34: 
Line 35:         container_len = len(self._vms)
Line 36: 
Line 37:         vm.run()
Line 38:         self.log.debug("Total desktops after creation of %s is %d" %
Can we change this from 'desktops' to 'virtual machines' ?  We can create server vms and desktop vms.
Line 39:                        (vmId, container_len))
Line 40: 
Line 41:         return vm
Line 42: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icc54c1d0ab7ad535d825dcd72fd2f4583b690f44
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list