The ssh session is waiting until the </nc:rpc-reply> delimiter is received,
but the last item to be sent in the pipe by the device is the trailing
]]>]]> as specified in the command (whether commitCmd or loadConfigurationString).
Change-Id: I3a7c5df3f06eb648a0551d7767f90acef533c5ee
Issue-ID: APPC-973
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
loadConfigurationString = loadConfigurationString + "]]>]]>";
sshJcraftWrapper.send(loadConfigurationString);
DebugLog.printAriDebug(fnName, ":After sending loadConfigurationString");
loadConfigurationString = loadConfigurationString + "]]>]]>";
sshJcraftWrapper.send(loadConfigurationString);
DebugLog.printAriDebug(fnName, ":After sending loadConfigurationString");
- response = sshJcraftWrapper.receiveUntil("</rpc-reply>", 600000, "");
+ response = sshJcraftWrapper.receiveUntil("]]>]]>", 600000, "");
if (response.indexOf("rpc-error") != -1) {
DebugLog.printAriDebug(fnName, "Error from device: Response from device had 'rpc-error'");
DebugLog.printAriDebug(fnName, "response=\n" + response + "\n");
if (response.indexOf("rpc-error") != -1) {
DebugLog.printAriDebug(fnName, "Error from device: Response from device had 'rpc-error'");
DebugLog.printAriDebug(fnName, "response=\n" + response + "\n");
DebugLog.printAriDebug(fnName, ":LoadConfiguration was a success, sending commit cmd");
sshJcraftWrapper.send(commitCmd);
DebugLog.printAriDebug(fnName, ":After sending commitCmd");
DebugLog.printAriDebug(fnName, ":LoadConfiguration was a success, sending commit cmd");
sshJcraftWrapper.send(commitCmd);
DebugLog.printAriDebug(fnName, ":After sending commitCmd");
- response = sshJcraftWrapper.receiveUntil("</rpc-reply>", 180000, "");
+ response = sshJcraftWrapper.receiveUntil("]]>]]>", 180000, "");
if (response.indexOf("rpc-error") != -1) {
DebugLog.printAriDebug(fnName, "Error from device: Response from device had 'rpc-error'");
DebugLog.printAriDebug(fnName, "response=\n" + response + "\n");
if (response.indexOf("rpc-error") != -1) {
DebugLog.printAriDebug(fnName, "Error from device: Response from device had 'rpc-error'");
DebugLog.printAriDebug(fnName, "response=\n" + response + "\n");