Martin Sivák has posted comments on this change.

Change subject: Adding API methods for CPU limit MOM integration
......................................................................


Patch Set 11:

(4 comments)

http://gerrit.ovirt.org/#/c/28462/11/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4494: 
Line 4495:     def setCpuTuneQuota(self, quota):
Line 4496: 
Line 4497:         try:
Line 4498:             quota = int(quota)
> This looks useless: you can write
Done
Line 4499:             self._dom.setSchedulerParameters({'vcpu_quota': quota})
Line 4500:         except ValueError:
Line 4501:             return self._reportError(key='cpuTuneErr', msg=
Line 4502:                                      'an integer is required for 
period')


Line 4504:             return self._reportError(key='cpuTuneErr', msg=e.message)
Line 4505:         return {'status': doneCode}
Line 4506: 
Line 4507:     def setCpuTunePeriod(self, period):
Line 4508: 
> unnecessary whitespace (or missing docstring?)
Done
Line 4509:         try:
Line 4510:             period = int(period)
Line 4511:             self._dom.setSchedulerParameters({'vcpu_period': period})
Line 4512:         except ValueError:


Line 4506: 
Line 4507:     def setCpuTunePeriod(self, period):
Line 4508: 
Line 4509:         try:
Line 4510:             period = int(period)
> same as per line 4498
Done
Line 4511:             self._dom.setSchedulerParameters({'vcpu_period': period})
Line 4512:         except ValueError:
Line 4513:             return self._reportError(key='cpuTuneErr', msg=
Line 4514:                                      'an integer is required for 
period')


Line 4510:             period = int(period)
Line 4511:             self._dom.setSchedulerParameters({'vcpu_period': period})
Line 4512:         except ValueError:
Line 4513:             return self._reportError(key='cpuTuneErr', msg=
Line 4514:                                      'an integer is required for 
period')
> it is strange pep8 doesn't complain. However, I'd like to have
Done
Line 4515:         except libvirt.libvirtError as e:
Line 4516:             return self._reportError(key='cpuTuneErr', msg=e.message)
Line 4517:         return {'status': doneCode}
Line 4518: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia78529b736ec0c841d232ba8aa1434bd0d0e8e08
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to