Gilad Chaplik has posted comments on this change.
Change subject: core: Fix empty quota validation in edit disk
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
Line 319:
Line 320:
Line 321: if (oldDiskImage.getQuotaId() == null ||
Guid.Empty.equals(oldDiskImage.getQuotaId())) { // empty old quota
Line 322: list.add(consumptionRequest);
Line 323: } else {
// non-empty old quota
Daniel, another thing, are we going to allow expanding the disk?
Line 324: if
(!oldDiskImage.getQuotaId().equals(newDiskImage.getQuotaId())) {
// different new quota
Line 325: list.add(consumptionRequest);
Line 326: list.add(releaseRequest);
Line 327: }
Line 324: if
(!oldDiskImage.getQuotaId().equals(newDiskImage.getQuotaId())) {
// different new quota
Line 325: list.add(consumptionRequest);
Line 326: list.add(releaseRequest);
Line 327: }
Line 328: }
I guess that if old.quota == new.quota, we can skip all of this... consider
adding it to isQuotaValidationNeeded()
Line 329: }
Line 330: return list;
Line 331: }
Line 332:
....................................................
Commit Message
Line 5: CommitDate: 2013-01-27 15:59:30 +0200
Line 6:
Line 7: core: Fix empty quota validation in edit disk
Line 8:
Line 9: When a disk with no quota is edited and the quota is not setted by the
/s/setted/set
Line 10: user, no quota validation takes place. The operation succeeds.
Line 11:
Line 12: This error is due to wrong logic in UpdateVmDiskCommand.
Line 13:
--
To view, visit http://gerrit.ovirt.org/11434
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I697171e9c47499048d5a735c0f0e5a253b41892a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches