Change in ovirt-engine[master]: core: Introduce DiskStorageTypePredicate

Code Review gerrit at ovirt.org
Sun Dec 4 21:31:47 UTC 2016


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: Introduce DiskStorageTypePredicate
......................................................................


core: Introduce DiskStorageTypePredicate

Introduced the DiskStorageTypePredicate class to lay the groundwork for
implementing DiskFilters for any concrete type that extends Disk.

The current patch just does the minimal work of converting the
ONLY_IMAGES predicate to use this new class, and the following patches
will introduce similar implementations for LunDisks and CinderDisks.

In order to perform this filtering, a forClass(Class<? extends Disk>)
method was added to DiskStorageType so it can be the only place that
holds the correlation between a DiskStorageType and the concrete Disk
class that matches it. Additionally, DiskStorageTypeTest was
introduced to verify that each concrete Disk type has a matching
DiskStorageType and that no DiskStorageType matches more than one Disk
class.

Change-Id: I4edf05438f426216f75792182e0174392894f9a6
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/DisksFilter.java
M backend/manager/modules/common/pom.xml
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskStorageType.java
A backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/storage/DiskStorageTypeTest.java
4 files changed, 73 insertions(+), 2 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



-- 
To view, visit https://gerrit.ovirt.org/64086
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4edf05438f426216f75792182e0174392894f9a6
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list