From: Alexis de Talhouët Date: Tue, 5 Jun 2018 20:40:13 +0000 (-0400) Subject: Fix delimiter string for xml-download CDT action X-Git-Tag: 1.4.0~236 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=aa40d7357b5445de9aac67bc8beee1a3a6361bb2;p=appc.git Fix delimiter string for xml-download CDT action The ssh session is waiting until the 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 --- diff --git a/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/ConfigComponentAdaptor.java b/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/ConfigComponentAdaptor.java index 66e24f477..6ff4a8688 100644 --- a/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/ConfigComponentAdaptor.java +++ b/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/ConfigComponentAdaptor.java @@ -383,7 +383,7 @@ public ConfigStatus configure(String key, Map parameters, SvcLog loadConfigurationString = loadConfigurationString + "]]>]]>"; sshJcraftWrapper.send(loadConfigurationString); DebugLog.printAriDebug(fnName, ":After sending loadConfigurationString"); - response = sshJcraftWrapper.receiveUntil("", 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"); @@ -393,7 +393,7 @@ public ConfigStatus configure(String key, Map parameters, SvcLog DebugLog.printAriDebug(fnName, ":LoadConfiguration was a success, sending commit cmd"); sshJcraftWrapper.send(commitCmd); DebugLog.printAriDebug(fnName, ":After sending commitCmd"); - response = sshJcraftWrapper.receiveUntil("", 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");