Change in ovirt-engine[master]: core: add MemoryStorageHandler the ability to sort
tnisan at redhat.com
tnisan at redhat.com
Tue Jun 2 12:35:48 UTC 2015
Tal Nisan has submitted this change and it was merged.
Change subject: core: add MemoryStorageHandler the ability to sort
......................................................................
core: add MemoryStorageHandler the ability to sort
This patch adds the MemoryStorageHandler mechanism the ability to sort
the list of storage domains according to given comparators logic. For
example, sort by the available disk size of a storage domain.
This way, if we have more than one valid candidate, we can sort the list
and get the most suitable domain out of it.
When there is more than one comparator, a nested sort is performed.
Change-Id: I00ad78fca97527a7dbf426a28ced7314a7bd921c
Bug-Url: https://bugzilla.redhat.com/1186230
Signed-off-by: Idan Shaby <ishaby at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryStorageHandler.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageDomainAvailableDiskSizeComparator.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageDomainNumberOfVmDisksComparator.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageTypeComparator.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainFilter.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainSpaceRequirementsFilter.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainStatusFilter.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainTypeFilter.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/MemoryStorageHandlerTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageDomainAvailableDiskSizeComparatorTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageDomainComparatorAbstractTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageDomainNumberOfVmDisksComparatorTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageTypeComparatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainFilterAbstractTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainFilterTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainSpaceRequirementsFilterTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainStatusFilterTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainTypeFilterTest.java
21 files changed, 448 insertions(+), 48 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Verified; Looks good to me, but someone else must approve
Idan Shaby: Verified
--
To view, visit https://gerrit.ovirt.org/40438
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I00ad78fca97527a7dbf426a28ced7314a7bd921c
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Candace Sheremeta <cshereme at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list