Change in ovirt-engine[master]: core: Verifying storage space for AddDiskCommand

amureini at redhat.com amureini at redhat.com
Sun Dec 8 17:37:17 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Verifying storage space for AddDiskCommand
......................................................................


core: Verifying storage space for AddDiskCommand

This is the first in a series of patches intended to fix storage space
allocation validation throught the system (see bz).
Added hasSpaceForNewDisk(s) in StorageDomainValidator. Added test -
StorageDomainValidatorFreeSpaceTest.
Applied use in AddDiskCommand (former use is buggy).

Amended AddDiskToVmCommandTest. Previous tests simulated several space
situations. These are now thoroughly tested in
StorageDomainValidatorFreeSpaceTest, where they belong, and therefore
removed from the command test. What's left to
test is that the command actually behaves according to the validator's
response. To that end added two new tests.

Also amended AddDiskCommand CDA to always check for threshold limits
(not only preallocated) since we want to have this leeway.

Bug-url: https://bugzilla.redhat.com/960934
Change-Id: I1a33502683ec77fba09efffba1438beb552082f7
Signed-off-by: Vered Volansky <vvolansk at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageDomainValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskToVmCommandTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/StorageDomainValidatorFreeSpaceTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/StorageDomainValidatorTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/DiskImage.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomain.java
7 files changed, 175 insertions(+), 64 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a33502683ec77fba09efffba1438beb552082f7
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list