ofri masad has posted comments on this change.
Change subject: core: Fix quota not counted when run VM from pool
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachUserToVmFromPoolAndRunCommand.java
Line 86: }
Line 87: return returnValue;
Line 88: }
Line 89:
Line 90: private Guid getVmToAttach(NGuid poolId) {
call from the canDoAction is called first - I'll call the field directly from
getQuotaVdsConsumptionParameters to prevent future mistakes.
Line 91: if (vmToAttach == null) {
Line 92: Guid vmGuid = Guid.Empty;
Line 93: vmGuid = getPrestartedVmToAttach(poolId);
Line 94: if (vmGuid == null || Guid.Empty.equals(vmGuid)) {
Line 88: }
Line 89:
Line 90: private Guid getVmToAttach(NGuid poolId) {
Line 91: if (vmToAttach == null) {
Line 92: Guid vmGuid = Guid.Empty;
Done
Line 93: vmGuid = getPrestartedVmToAttach(poolId);
Line 94: if (vmGuid == null || Guid.Empty.equals(vmGuid)) {
Line 95: vmGuid = getNonPrestartedVmToAttach(poolId);
Line 96: }
Line 317: @Override
Line 318: public List<QuotaConsumptionParameter>
getQuotaVdsConsumptionParameters() {
Line 319: List<QuotaConsumptionParameter> list = new
ArrayList<QuotaConsumptionParameter>();
Line 320:
Line 321: VM vm =
DbFacade.getInstance().getVmDao().get(getVmToAttach(getParameters().getVmPoolId()));
Done
Line 322:
Line 323: setStoragePoolId(vm.getStoragePoolId());
Line 324:
Line 325: list.add(new
QuotaVdsGroupConsumptionParameter(vm.getQuotaId(),
--
To view, visit http://gerrit.ovirt.org/14098
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iafcdf2462de9a2f8bb4132af9173f5ed4ead47cf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches