Shireesh Anjal has posted comments on this change.

Change subject: engine: Get Gluster Servers query
......................................................................


Patch Set 10: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterServersQuery.java
Line 66:                 docBuilder = docBuilderFactory.newDocumentBuilder();
Line 67:                 InputSource is = new InputSource(new 
StringReader(glusterServers));
Line 68:                 Document doc = docBuilder.parse(is);
Line 69:                 // normalize text representation
Line 70:                 doc.getDocumentElement().normalize();
The XML document loading logic can go to a separate method.
Line 71:                 NodeList listOfPeers = doc.getElementsByTagName(PEER);
Line 72: 
Line 73:                 extractServers(listOfPeers);
Line 74: 


Line 131:         client.setUser("root");
Line 132:         client.setPassword(getParameters().getRootPassword());
Line 133: 
Line 134:         try {
Line 135:             client.authenticate();
You are right. As I've mentioned before, authenticate() is definitely a good 
candidate to be a separate function. And with the exception handling 
centralized at exeuteQueryCommand(), it definitely makes more sense to separate 
out authenticate() and executeCommand().
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 <dgo...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Dhandapani Gopal <dgo...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Selvasundaram <sesub...@redhat.com>
Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to