Allon Mureinik has posted comments on this change. Change subject: core: Add a CDA on attach to an uninitialized Data Center ......................................................................
Patch Set 17: (2 comments) nits, see inline. http://gerrit.ovirt.org/#/c/34239/17/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStoragePoolWithStoragesCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStoragePoolWithStoragesCommand.java: Line 313: private boolean isDomainAttachedToDifferentStoragePool() { Line 314: if (getStoragePool().getStatus() == StoragePoolStatus.Uninitialized) { Line 315: for (Guid storageDomainId : getParameters().getStorages()) { Line 316: StorageDomain domain = DbFacade.getInstance().getStorageDomainDao().get(storageDomainId); Line 317: if (domain.getStorageDomainType() == StorageDomainType.Data && isStorageDomainAttachedToStoragePool(domain)) { please use domain.getStorageDomainType().isData() Line 318: addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_ADD_STORAGE_DOMAIN_WITH_ATTACHED_DATA_DOMAIN); Line 319: return false; Line 320: } Line 321: } Line 315: for (Guid storageDomainId : getParameters().getStorages()) { Line 316: StorageDomain domain = DbFacade.getInstance().getStorageDomainDao().get(storageDomainId); Line 317: if (domain.getStorageDomainType() == StorageDomainType.Data && isStorageDomainAttachedToStoragePool(domain)) { Line 318: addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_ADD_STORAGE_DOMAIN_WITH_ATTACHED_DATA_DOMAIN); Line 319: return false; please user return failCanDoAction Line 320: } Line 321: } Line 322: } Line 323: return true; -- To view, visit http://gerrit.ovirt.org/34239 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaba522270660aaf2b58e7e771e31c9084824076f Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
