Michal Skrivanek has posted comments on this change.

Change subject: set the # of vcpus for a VM (hot plug/unplug)
......................................................................


Patch Set 19:

(1 comment)

....................................................
File vdsm/vm.py
Line 895:         self.dom.appendChildWithArgs('uuid', text=self.conf['vmId'])
Line 896:         memSizeKB = str(int(self.conf.get('memSize', '256')) * 1024)
Line 897:         self.dom.appendChildWithArgs('memory', text=memSizeKB)
Line 898:         self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
Line 899:         smp = self._getSmp()
I would not obfuscate the code more. I'd leave this the way it was without 
helper functions; and similarly for vcpus just use a variable vcpu holding the 
number (and use again at line 1057) and call the xml snippet on the next line 
vcpuelem instead (as is the convention elsewhere)
Line 900:         vcpu = self.dom.appendChildWithArgs(
Line 901:             'vcpu', text=self._getMaxVCpus())
Line 902:         vcpu.setAttrs(**{'current': smp})
Line 903: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief35e1d335737cd98d21a5413ac9f8ab9d824c3e
Gerrit-PatchSet: 19
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to