Allon Mureinik has posted comments on this change. Change subject: core: UpdateStoragePoolCommand refactoring. ......................................................................
Patch Set 5: (2 comments) http://gerrit.ovirt.org/#/c/35788/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java: Line 175: List<StorageDomainStatic> poolDomains = getStorageDomainStaticDAO().getAllForStoragePool(getStoragePool().getId()); Line 176: if ( getOldStoragePool().isLocal() != getStoragePool().isLocal() && !poolDomains.isEmpty() ) { Line 177: return failCanDoAction(VdcBllMessages.ERROR_CANNOT_CHANGE_STORAGE_POOL_TYPE_WITH_DOMAINS); Line 178: } Line 179: if (!checkStoragePoolNameLengthValid()) { I'd group this up top, with all the validations on the pool name. Line 180: return false; Line 181: } Line 182: if ( !getOldStoragePool().getcompatibility_version().equals(getStoragePool() Line 183: .getcompatibility_version())) { Line 199: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION); Line 200: } Line 201: } else { Line 202: // Check all clusters has at least the same compatibility version. Line 203: if (!checkAllClustersLevel()) { Can we collapse this to an "else if"? Line 204: return false; Line 205: } Line 206: } Line 207: } -- To view, visit http://gerrit.ovirt.org/35788 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icd0c28eb86af753a7e48e845da23fc5feca2019a Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[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
