Dhandapani Gopal has posted comments on this change.

Change subject: engine: Validation added in Import Cluster
......................................................................


Patch Set 3: (2 inline comments)

Incorporated review comments

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterServersForImportQuery.java
Line 66: 
Line 67:             Map<String, String> serverFingerPrint = 
extractServers(serversXml);
Line 68: 
Line 69:             // Check if any of the server in the map is already part 
of some other cluster.
Line 70:             if (isServerPartOfCluster(serverFingerPrint)) {
Passing serverFingerPrint.keySet() to this method.
Line 71:                 setReturnMessage();
Line 72:             }
Line 73:             getQueryReturnValue().setReturnValue(serverFingerPrint);
Line 74:         } catch (Exception e) {


Line 85:         
getQueryReturnValue().setExceptionString(VdcBllMessages.SERVER_ALREADY_EXISTS_IN_ANOTHER_CLUSTER.name());
Line 86:         return;
Line 87:     }
Line 88: 
Line 89:     private boolean isServerPartOfCluster(Map<String, String> 
serverFingerPrint) {
Renamed the method to areServersPartOfCluster()
Line 90:         for (Map.Entry<String, String> entry : 
serverFingerPrint.entrySet()) {
Line 91:             if (getVdsStaticDao().getAllForHost(entry.getKey()).size() 
> 0
Line 92:                     || 
getVdsStaticDao().getAllWithIpAddress(entry.getKey()).size() > 0) {
Line 93:                 return true;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8323f2dcc4f278dfbc01f99ebe18b0f2bd0296ca
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to