Dhandapani Gopal has posted comments on this change.
Change subject: engine: Get Gluster Servers query
......................................................................
Patch Set 10: (4 inline comments)
Responses to review comments in-line. New patch-set to follow with some of the
comments incorporated.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterServersQuery.java
Line 71: NodeList listOfPeers = doc.getElementsByTagName(PEER);
Line 72:
Line 73: extractServers(listOfPeers);
Line 74:
Line 75:
getQueryReturnValue().setReturnValue(getServerFingerPrintMap());
Done
Line 76: } else {
Line 77: String errMsg = "Could not get the peer list form the
host: " + getParameters().getServerName();
Line 78: log.error(errMsg);
Line 79: throw new RuntimeException(errMsg);
Line 93: }
Line 94: }
Line 95: }
Line 96:
Line 97: private void validateFingerprint(SSHClient client) {
Don't get you. Is there a reason for it *not* to be a function?
Line 98: if
(!getParameters().getFingerprint().equals(getFingerprint(client))) {
Line 99: String errMsg =
Line 100: "SSH Fingerprint of server " +
getParameters().getServerName()
Line 101: + " did not match expected fingerprint "
+ getParameters().getFingerprint();
Line 103: throw new RuntimeException(errMsg);
Line 104: }
Line 105: }
Line 106:
Line 107: protected SSHClient createSSHClient() {
While writing Junit test, I need to mock the SSHClient. For that purpose I keep
this in seperate method.
Line 108: return new SSHClient();
Line 109: }
Line 110:
Line 111: protected SSHClient connect(String serverName) {
Line 131: client.setUser("root");
Line 132: client.setPassword(getParameters().getRootPassword());
Line 133:
Line 134: try {
Line 135: client.authenticate();
We are executing only one command in this query. In any case, will rename the
method to authenticateAndExecuteCommand to make it more clear.
Line 136: client.executeCommand(command, null, out, null);
Line 137: cliOutput = new String(out.toByteArray(), "UTF-8");
Line 138: } catch (Exception e) {
Line 139: String m =
--
To view, visit http://gerrit.ovirt.org/7584
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic69a9a48bf227c8fa805c8aa9c4f08fa36ea9425
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Selvasundaram <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches