Liron Aravot has posted comments on this change. Change subject: core: find connections with same password ......................................................................
Patch Set 2: (2 comments) http://gerrit.ovirt.org/#/c/36320/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java: Line 81: return false; Line 82: } Line 83: Line 84: Guid storagePoolId = Guid.isNullOrEmpty(getParameters().getVdsId()) ? null : getVds().getStoragePoolId(); Line 85: > will be removed on the next patchset Done Line 86: if (isConnWithSameDetailsExists(paramConnection, storagePoolId)) { Line 87: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ALREADY_EXISTS); Line 88: } Line 89: // If a Guid is not supplied, we won't attempt to [dis]connect. http://gerrit.ovirt.org/#/c/36320/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java: Line 155: } Line 156: } Line 157: return (List<StorageServerConnections>) CollectionUtils.subtract(connections, toRemove); Line 158: } Line 159: > This need some javadoc to explain why it isn't just a dao call. I've added a comment, as it seems to me as internal implementation detail of the method i've added it as a regular comment and not as a javadoc. Line 160: public static StorageServerConnections findConnectionWithSameDetails(StorageServerConnections connection) { Line 161: List<StorageServerConnections> connections = DbFacade.getInstance().getStorageServerConnectionDao().getAllForConnection(connection); Line 162: for (StorageServerConnections dbConnection : connections) { Line 163: if (ObjectUtils.objectsEqual(dbConnection.getpassword(), connection.getpassword())) { -- To view, visit http://gerrit.ovirt.org/36320 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0fc70dd4e7988f4ea4597f016c9de8419c17adfa Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Liron Aravot <[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
