Tal Nisan has uploaded a new change for review. Change subject: core: Replaced the check of whether a storage pool contains mixed type ......................................................................
core: Replaced the check of whether a storage pool contains mixed type Replaced the check of whether a storage pool contains storage domains of mixed types to use a designated query that fetches distinct storage types instead of fetching all the storage domains and filtering by that Change-Id: I86cf1512655865831de3cbd16c10a7bc243f08cd Signed-off-by: Tal Nisan <tni...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/26982/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java index 0ffe4b4..d30f00c 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java @@ -234,9 +234,9 @@ public boolean isMixedTypeDC(StorageDomain storageDomain) { boolean isBlockDomain = storageDomain.getStorageType().isBlockDomain(); - List<StorageDomain> poolDomains = getStorageDomainDAO().getAllForStoragePool(getStoragePoolId()); - for (StorageDomain currSD : poolDomains) { - if (!isStorageDomainOfTypeIsoOrExport(currSD) && currSD.getStorageType().isBlockDomain() != isBlockDomain) { + List<StorageType> storageTypesOnPool = getStoragePoolDAO().getStorageTypesInPool(getStoragePoolId()); + for (StorageType storageType : storageTypesOnPool) { + if (storageType.isBlockDomain() != isBlockDomain) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED); return true; } -- To view, visit http://gerrit.ovirt.org/26982 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86cf1512655865831de3cbd16c10a7bc243f08cd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <tni...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches