Amit Aviram has posted comments on this change. Change subject: core: Command refactoring. ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/35788/1/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 168: } Line 169: if (!StringUtils.equals(getOldStoragePool().getName(), getStoragePool().getName()) Line 170: && !isStoragePoolUnique(getStoragePool().getName())) { Line 171: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NAME_ALREADY_EXIST); Line 172: return false; > If you're at it you can change it to: Done Line 173: } Line 174: if ( getOldStoragePool().isLocal() != getStoragePool().isLocal() Line 175: && getStorageDomainStaticDAO().getAllForStoragePool(getStoragePool().getId()).size() > 0) { Line 176: getReturnValue().getCanDoActionMessages() http://gerrit.ovirt.org/#/c/35788/1/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommandTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommandTest.java: Line 94: doReturn(vdsGroupDao).when(cmd).getVdsGroupDAO(); Line 95: doReturn(vdsDao).when(cmd).getVdsDAO(); Line 96: doReturn(networkDao).when(cmd).getNetworkDAO(); Line 97: doReturn(validator).when(cmd).createStoragePoolValidator(); Line 98: doReturn(true).when(sdList).isEmpty(); > How is this related to the command change? Basically the refactoring didn't change the results of the tests. still- this addition is relevant because activating isEmpty() gives back a wrong result. (this will take actuall effect in the following patches) Line 99: Line 100: mcr.mockConfigValue(ConfigValues.AutoRegistrationDefaultVdsGroupID, DEFAULT_VDS_GROUP_ID); Line 101: mcr.mockConfigValue(ConfigValues.ManagementNetwork, "test_mgmt"); Line 102: mcr.mockConfigValue(ConfigValues.NonVmNetworkSupported, false); -- 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: 1 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
