Allon Mureinik has posted comments on this change.

Change subject: core: check if duplicate storage connection exists
......................................................................


Patch Set 3: Looks good to me, but someone else must approve

(2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageServerConnectionCommandBase.java
Line 52:             connections = 
getStorageConnDao().getAllForConnection(connection);
Line 53:         }
Line 54: 
Line 55:         if (connections.size() > 1
Line 56:                 || (connections.size() == 1 && 
!connections.get(0).getid().equalsIgnoreCase(connection.getid()))) {
why is equalsIgnoreCase used and not just equals?

Also, this if statenebt is redundant:
if (booleanStatement) {
   return true;
}
else {
   return false;
}

just do "return booleanStatement"
Line 57:             return true;
Line 58:         }
Line 59:         else {
Line 60:             return false;


....................................................
Commit Message
Line 8: 
Line 9: Check in Add/Update storage connection whether
Line 10: a duplicate storage connection already exists.
Line 11: The check was already present only for file domains in 
AddStorageConnection
Line 12: command, and now it is expanded to check for block domains  as well,
double space before the "as well", might as well fix it when you rebase.
Line 13: and is also used now by the UpdateStorageServerConnection.
Line 14: Also moved the code to a parent command to allow code reuse,
Line 15: and added corresponding unitests.
Line 16: 


-- 
To view, visit http://gerrit.ovirt.org/16037
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0cfc642c49ab4fc482c5d1fabc28fad0ae79d2f4
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to