JUnits for SshJcraftWrapper.java connect
[appc.git] / appc-config / appc-config-adaptor / provider / src / main / java / org / onap / appc / ccadaptor / ConfigComponentAdaptor.java
index 064d2ba..0ac7f3e 100644 (file)
@@ -198,7 +198,7 @@ public class ConfigComponentAdaptor implements SvcLogicAdaptor {
             try {
                 log.debug("CLI: Attempting to login: host={} loginId={} password={} portNumber={}", host, loginId,
                     password, portNumber);
-                sshJcraftWrapper.connect(host, loginId, password, Integer.parseInt(portNumber));
+                sshJcraftWrapper.connect(host, loginId, password); //what about portNum?
 
                 log.debug("Sending 'sdc'");
                 sshJcraftWrapper.send("sdc", ":");
@@ -324,8 +324,7 @@ public class ConfigComponentAdaptor implements SvcLogicAdaptor {
             SshJcraftWrapper sshJcraftWrapper = new SshJcraftWrapper();
             try {
                 sshJcraftWrapper
-                    .connect(Host_ip_address, User_name, Password, "]]>]]>", 30000, Integer.parseInt(Port_number),
-                        "netconf");
+                    .connect(Host_ip_address, User_name, Password, 30000, Integer.parseInt(Port_number), "netconf"); // what about prompt "]]>]]>"?
                 String NetconfHelloCmd = netconfHelloCmd;
                 NetconfHelloCmd = NetconfHelloCmd + "]]>]]>";
                 log.debug("Sending the hello command");
@@ -396,8 +395,8 @@ public class ConfigComponentAdaptor implements SvcLogicAdaptor {
             try {
                 String NetconfHelloCmd = netconfHelloCmd;
                 sshJcraftWrapper
-                    .connect(Host_ip_address, User_name, Password, "]]>]]>", 30000, Integer.parseInt(Port_number),
-                        "netconf");
+                    .connect(Host_ip_address, User_name, Password, 30000, Integer.parseInt(Port_number),
+                        "netconf"); //What about prompt "]]>]]>" here?
                 NetconfHelloCmd = NetconfHelloCmd + "]]>]]>";
                 log.debug(":Sending the hello command");
                 sshJcraftWrapper.send(NetconfHelloCmd);