aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/SshJcraftWrapper.java1942
-rw-r--r--appc-config/appc-data-services/features/src/main/resources/features.xml2
-rw-r--r--appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java4
-rw-r--r--appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_CheckConfigStatus.json2
-rw-r--r--appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_DGOrchestrator.json2
-rw-r--r--appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_MergeTemplateData.json2
-rw-r--r--appc-inbound/appc-artifact-handler/features/src/main/resources/features.xml4
-rw-r--r--appc-inbound/appc-design-services/features/src/main/resources/features.xml12
-rw-r--r--appc-outbound/appc-aai-client/features/src/main/resources/features.xml2
-rw-r--r--appc-outbound/appc-network-inventory-client/features/src/main/resources/features.xml4
10 files changed, 1005 insertions, 971 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/SshJcraftWrapper.java b/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/SshJcraftWrapper.java
index ea98baed8..4d2169401 100644
--- a/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/SshJcraftWrapper.java
+++ b/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/SshJcraftWrapper.java
@@ -1,20 +1,24 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
@@ -33,446 +37,445 @@ import com.jcraft.jsch.*;
public class SshJcraftWrapper
{
- private String debugLogFileName = "/tmp/sshJcraftWrapperDebug";
- InputStream inputStream = null;
- OutputStream outputStream = null;
- private TelnetListener listener = null;
- private String routerLogFileName = null;
- DebugLog debugLog = new DebugLog();
- private String host = null;
- private String RouterName = null;
- private int BUFFER_SIZE = 512000;
- // private int BUFFER_SIZE = 4000000;
- private DataInputStream dis = null;
- private BufferedReader reader = null;
- char[] charBuffer = new char[BUFFER_SIZE];
- private BufferedWriter out = null;
- private File _tmpFile = null;
- private JSch jsch = null;
- private Session session = null;
- private Channel channel = null;
- private String tId = "";
- private String aggregatedReceivedString = "";
- private File extraDebugFile = new File("/tmp/sshJcraftWrapperDEBUG");
- private String routerCmdType = "XML";
- private String routerFileName = null;
- private File jcraftReadSwConfigFileFromDisk = new File("/tmp/jcraftReadSwConfigFileFromDisk");
- private String equipNameCode = null;
- private String hostName = null;
- private String userName = null;
- private String passWord = null;
- private StringBuffer charactersFromBufferFlush = new StringBuffer();
- private Runtime runtime = Runtime.getRuntime();
- private DebugLog dbLog = new DebugLog();
-
- public void SshJcraftWrapper()
- {
- String fn = "SshJcraftWrapper.SshJcraftWrapper";
- debugLog.printRTAriDebug (fn, "SshJcraftWrapper has been instantated");
- routerLogFileName = "/tmp/" +host;
- this.host = host;
- }
-
- public void connect (String hostname, String username, String password, String prompt, int timeOut) throws IOException
- {
- String fn = "SshJcraftWrapper.connect";
- jsch = new JSch();
- debugLog.printRTAriDebug (fn, "Attempting to connect to "+hostname +" username="+username +
- " password="+password + " prompt='"+prompt +"' timeOut="+timeOut);
- debugLog.printRTAriDebug (fn, "Trace A");
- RouterName = hostname;
- hostName = hostname;
- userName = username;
- passWord = password;
- try
- {
- session = jsch.getSession(username, hostname, 22);
- UserInfo ui = new MyUserInfo();
- session.setPassword(password);
- session.setUserInfo(ui);
- session.connect(timeOut);
- channel = session.openChannel("shell");
- session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
- ((ChannelShell)channel).setPtyType("vt102");
- inputStream = channel.getInputStream();
- dis = new DataInputStream(inputStream);
- reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
- channel.connect();
- debugLog.printRTAriDebug (fn, "Successfully connected.");
- debugLog.printRTAriDebug (fn, "Flushing input buffer");
- try
+
+ private String debugLogFileName = "/tmp/sshJcraftWrapperDebug";
+ InputStream inputStream = null;
+ OutputStream outputStream = null;
+ private TelnetListener listener = null;
+ private String routerLogFileName = null;
+ DebugLog debugLog = new DebugLog();
+ private String host = null;
+ private String RouterName = null;
+ private int BUFFER_SIZE = 512000;
+ // private int BUFFER_SIZE = 4000000;
+ private DataInputStream dis = null;
+ private BufferedReader reader = null;
+ char[] charBuffer = new char[BUFFER_SIZE];
+ private BufferedWriter out = null;
+ private File _tmpFile = null;
+ private JSch jsch = null;
+ private Session session = null;
+ private Channel channel = null;
+ private String tId = "";
+ private String aggregatedReceivedString = "";
+ private File extraDebugFile = new File("/tmp/sshJcraftWrapperDEBUG");
+ private String routerCmdType = "XML";
+ private String routerFileName = null;
+ private File jcraftReadSwConfigFileFromDisk = new File("/tmp/jcraftReadSwConfigFileFromDisk");
+ private String equipNameCode = null;
+ private String hostName = null;
+ private String userName = null;
+ private String passWord = null;
+ private StringBuffer charactersFromBufferFlush = new StringBuffer();
+ private Runtime runtime = Runtime.getRuntime();
+ private DebugLog dbLog = new DebugLog();
+
+ public void SshJcraftWrapper()
+ {
+ String fn = "SshJcraftWrapper.SshJcraftWrapper";
+ debugLog.printRTAriDebug (fn, "SshJcraftWrapper has been instantated");
+ routerLogFileName = "/tmp/" +host;
+ this.host = host;
+ }
+
+ public void connect (String hostname, String username, String password, String prompt, int timeOut) throws IOException
+ {
+ String fn = "SshJcraftWrapper.connect";
+ jsch = new JSch();
+ debugLog.printRTAriDebug (fn, "Attempting to connect to "+hostname +" username="+username +" password="+password + " prompt='"+prompt +"' timeOut="+timeOut);
+ debugLog.printRTAriDebug (fn, "Trace A");
+ RouterName = hostname;
+ hostName = hostname;
+ userName = username;
+ passWord = password;
+ try
+ {
+ session = jsch.getSession(username, hostname, 22);
+ UserInfo ui = new MyUserInfo();
+ session.setPassword(password);
+ session.setUserInfo(ui);
+ session.connect(timeOut);
+ channel = session.openChannel("shell");
+ session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
+ ((ChannelShell)channel).setPtyType("vt102");
+ inputStream = channel.getInputStream();
+ dis = new DataInputStream(inputStream);
+ reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
+ channel.connect();
+ debugLog.printRTAriDebug (fn, "Successfully connected.");
+ debugLog.printRTAriDebug (fn, "Flushing input buffer");
+ try
+ {
+ receiveUntil(prompt, 3000, "No cmd was sent, just waiting");
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception: Nothing to flush out.");
+ }
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception. e="+e);
+ // dbLog.storeData("ErrorMsg= Exception trying to connect to "+hostname +" "+e);
+ throw new IOException(e.toString());
+ }
+ }
+
+ // User specifies the port number.
+ public void connect (String hostname, String username, String password, String prompt, int timeOut, int portNum) throws IOException
+ {
+ String fn = "SshJcraftWrapper.connect";
+ debugLog.printRTAriDebug (fn, ":Attempting to connect to "+hostname +" username="+username +" password="+password + " prompt='"+prompt +"' timeOut="+timeOut +" portNum="+portNum);
+ RouterName = hostname;
+ hostName = hostname;
+ userName = username;
+ passWord = password;
+ RouterName = hostname;
+ jsch = new JSch();
+ try
+ {
+ session = jsch.getSession(username, hostname, portNum);
+ UserInfo ui = new MyUserInfo();
+ session.setPassword(password);
+ session.setUserInfo(ui);
+ session.setConfig("StrictHostKeyChecking", "no");
+ debugLog.printRTAriDebug (fn, ":StrictHostKeyChecking set to 'no'");
+
+ session.connect(timeOut);
+ session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
+ channel = session.openChannel("shell");
+ ((ChannelShell)channel).setPtyType("vt102");
+ inputStream = channel.getInputStream();
+ dis = new DataInputStream(inputStream);
+ reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
+ channel.connect();
+ debugLog.printRTAriDebug (fn, ":Successfully connected.");
+ debugLog.printRTAriDebug (fn, ":Flushing input buffer");
+ try
+ {
+ if (prompt.equals("]]>]]>"))
+ receiveUntil("]]>]]>", 10000, "No cmd was sent, just waiting");
+ else
+ receiveUntil(":~#", 5000, "No cmd was sent, just waiting");
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception::: Nothing to flush out.");
+ }
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, ":Caught an Exception. e="+e);
+ dbLog.outputStackTrace(e);
+
+ // dbLog.storeData("ErrorMsg= Exception trying to connect to "+hostname +" "+e);
+ throw new IOException(e.toString());
+ }
+ }
+
+
+ public String receiveUntil (String delimeters, int timeout, String cmdThatWasSent) throws TimedOutException, IOException
+ {
+ String fn = "SshJcraftWrapper.receiveUntil";
+ boolean match = false;
+ boolean cliPromptCmd = false;
+ StringBuffer sb2 = new StringBuffer();
+ StringBuffer sbReceive = new StringBuffer();
+ debugLog.printRTAriDebug (fn, "delimeters='"+delimeters +"' timeout="+timeout +" cmdThatWasSent='"+cmdThatWasSent +"'");
+ appendToFile(debugLogFileName, fn +" delimeters='"+delimeters +"' timeout="+timeout +" cmdThatWasSent='"+cmdThatWasSent +"'\n");
+ String CmdThatWasSent = removeWhiteSpaceAndNewLineCharactersAroundString(cmdThatWasSent);
+ int readCounts = 0;
+ aggregatedReceivedString = "";
+
+ long deadline = new Date().getTime() + timeout;
+ try
+ {
+ session.setTimeout(timeout); // This is the socket timeout value.
+ while (!match)
{
- receiveUntil(prompt, 3000, "No cmd was sent, just waiting");
+ if(new Date().getTime() > deadline)
+ {
+ debugLog.printRTAriDebug (fn, "Throwing a TimedOutException: time in routine has exceed our deadline: RouterName:"+RouterName +" CmdThatWasSent="+ CmdThatWasSent);
+ throw new TimedOutException("Timeout: time in routine has exceed our deadline");
+ }
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (java.lang.InterruptedException ee)
+ {
+ boolean ignore = true;
+ }
+ int len = reader.read(charBuffer, 0, BUFFER_SIZE);
+ appendToFile(debugLogFileName, fn +" After reader.read cmd: len="+len +"\n");
+ if (len <= 0)
+ {
+ debugLog.printRTAriDebug (fn, "Reader read "+len +" bytes. Looks like we timed out, router="+RouterName);
+ throw new TimedOutException ("Received a SocketTimeoutException router="+RouterName);
+ }
+ if (!cliPromptCmd)
+ {
+ if (cmdThatWasSent.indexOf("IOS_XR_uploadedSwConfigCmd") != -1)
+ {
+ if (out == null)
+ {
+ // This is a IOS XR sw config file. We will write it to the disk.
+ timeout = timeout * 2;
+ deadline = new Date().getTime() + timeout;
+ debugLog.printRTAriDebug (fn, "IOS XR upload for software config: timeout="+timeout);
+ StringTokenizer st = new StringTokenizer(cmdThatWasSent);
+ st.nextToken();
+ routerFileName = st.nextToken();
+ out = new BufferedWriter(new FileWriter(routerFileName));
+ routerLogFileName = "/tmp/"+RouterName;
+ _tmpFile = new File(routerLogFileName);
+ debugLog.printRTAriDebug (fn, "Will write the swConfigFile to disk, routerFileName="+routerFileName);
+ }
+ int c;
+ out.write(charBuffer, 0, len);
+ out.flush();
+ appendToFile(debugLogFileName, fn +" Wrote "+len +" bytes to the disk\n");
+ if (_tmpFile.exists())
+ appendToRouterFile(routerLogFileName, len);
+ match = checkIfReceivedStringMatchesDelimeter(len, "\nXML>");
+ if (match == true)
+ {
+ out.flush();
+ out.close();
+ out = null;
+ return null;
+ }
+ }
+ else
+ {
+ readCounts ++;
+ appendToFile(debugLogFileName, fn +" readCounts="+readCounts +" Reader read "+len +" of data\n");
+ int c;
+ sb2.setLength(0);
+ for(int i=0; i<len; i++ )
+ {
+ c = charBuffer[i];
+ if ((c != 7) && (c != 13) && (c != 0) && (c != 27))
+ {
+ sbReceive.append((char)charBuffer[i]);
+ sb2.append((char)charBuffer[i]);
+ }
+ }
+ appendToRouterFile("/tmp/"+RouterName, len);
+ if (listener != null)
+ listener.receivedString(sb2.toString());
+
+ appendToFile(debugLogFileName, fn +" Trace 1\n");
+ match = checkIfReceivedStringMatchesDelimeter(delimeters, sb2.toString(), cmdThatWasSent);
+ appendToFile(debugLogFileName, fn +" Trace 2\n");
+ if (match == true)
+ {
+ appendToFile(debugLogFileName, fn +" Match was true, breaking...\n");
+ break;
+ }
+ }
+ }
+ else
+ {
+ debugLog.printRTAriDebug (fn, "cliPromptCmd, Trace 2");
+ sb2.setLength(0);
+ for(int i=0; i<len; i++ )
+ {
+ sbReceive.append( (char)charBuffer[i] );
+ sb2.append( (char)charBuffer[i] );
+ }
+ appendToRouterFile("/tmp/"+RouterName, sb2);
+ if (listener != null)
+ listener.receivedString(sb2.toString());
+ debugLog.printRTAriDebug (fn, "sb2='"+sb2.toString() +"' delimeters='" +delimeters +"'");
+ if (sb2.toString().indexOf("\nariPrompt>") != -1)
+ {
+ debugLog.printRTAriDebug (fn, "Found our prompt");
+ match = true;
+ break;
+ }
+ }
}
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception: Nothing to flush out.");
+ }
+ catch (JSchException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an JSchException e="+e.toString());
+ dbLog.outputStackTrace(e);
+ throw new TimedOutException (e.toString());
+ }
+ catch (IOException ee)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException: ee="+ee.toString());
+ dbLog.outputStackTrace(ee);
+ throw new TimedOutException (ee.toString());
+ }
+ String result = stripOffCmdFromRouterResponse(sbReceive.toString());
+ debugLog.printRTAriDebug (fn, "Leaving method successfully");
+ return (result);
+ }
+
+ public boolean checkIfReceivedStringMatchesDelimeter(String delimeters, String receivedString, String cmdThatWasSent)
+ {
+ // The delimeters are in a '|' seperated string. Return true on the first match.
+ String fn = "SshJcraftWrapper.checkIfReceivedStringMatchesDelimeter";
+ appendToFile(debugLogFileName, fn +" Entered: delimeters='"+delimeters +" cmdThatWasSent='"+cmdThatWasSent +"' receivedString='"+receivedString +"'\n");
+ StringTokenizer st = new StringTokenizer(delimeters, "|");
+
+ if ((delimeters.indexOf("#$") != -1) || (routerCmdType.equals("CLI"))) // This would be an IOS XR, CLI command.
+ {
+ int x = receivedString.lastIndexOf("#");
+ int y = receivedString.length() - 1;
+ appendToFile(debugLogFileName, fn +" IOS XR, CLI command\n");
+ if (extraDebugFile.exists())
+ appendToFile(debugLogFileName, fn +" :::cmdThatWasSent='"+cmdThatWasSent +"' x="+x +" y="+y +"\n");
+ if ((x != -1) && (y == x))
+ return(true);
+ else
+ return(false);
+ }
+ if (cmdThatWasSent.indexOf("show config") != -1)
+ {
+ appendToFile(debugLogFileName, fn +"In the block for 'show config'\n");
+ while (st.hasMoreTokens())
+ {
+ String delimeter = st.nextToken();
+ // Make sure we don't get faked out by a response of " #".
+ // Proc #0
+ // # signaling-local-address ipv6 FD00:F4D5:EA06:1::110:136:254
+ // LAAR2#
+ int x = receivedString.lastIndexOf(delimeter);
+ if ((receivedString.lastIndexOf(delimeter) != -1) && (receivedString.lastIndexOf(" #") != x-1))
+ {
+ appendToFile(debugLogFileName, fn +"receivedString=\n'" +receivedString +"'\n");
+ appendToFile(debugLogFileName, fn +"Returning true for the 'show config' command. We found our real delmeter. \n\n");
+ return (true);
+ }
}
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception. e="+e);
- throw new IOException(e.toString());
- }
- }
-
- // User specifies the port number.
- public void connect (String hostname, String username, String password, String prompt, int timeOut, int portNum) throws IOException
- {
- String fn = "SshJcraftWrapper.connect";
- debugLog.printRTAriDebug (fn, ":Attempting to connect to "+hostname +" username="+username +
- " password="+password + " prompt='"+prompt +"' timeOut="+timeOut +" portNum="+portNum);
- RouterName = hostname;
- hostName = hostname;
- userName = username;
- passWord = password;
- RouterName = hostname;
- jsch = new JSch();
- try
- {
- session = jsch.getSession(username, hostname, portNum);
- UserInfo ui = new MyUserInfo();
- session.setPassword(password);
- session.setUserInfo(ui);
- session.setConfig("StrictHostKeyChecking", "no");
- debugLog.printRTAriDebug (fn, ":StrictHostKeyChecking set to 'no'");
-
- session.connect(timeOut);
- session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
- channel = session.openChannel("shell");
- ((ChannelShell)channel).setPtyType("vt102");
- inputStream = channel.getInputStream();
- dis = new DataInputStream(inputStream);
- reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
- channel.connect();
- debugLog.printRTAriDebug (fn, ":Successfully connected.");
- debugLog.printRTAriDebug (fn, ":Flushing input buffer");
- try
+ }
+ else
+ {
+ aggregatedReceivedString = aggregatedReceivedString + receivedString;
+ _appendToFile ("/tmp/aggregatedReceivedString.debug", aggregatedReceivedString);
+
+ while (st.hasMoreTokens())
{
- if (prompt.equals("]]>]]>"))
- receiveUntil("]]>]]>", 10000, "No cmd was sent, just waiting");
- else
- receiveUntil(":~#", 5000, "No cmd was sent, just waiting");
+ String delimeter = st.nextToken();
+ appendToFile(debugLogFileName, fn +" Looking for an delimeter of:'"+delimeter+"'\n");
+ appendToFile(debugLogFileName, fn +" receivedString='"+receivedString);
+ if (aggregatedReceivedString.indexOf(delimeter) != -1)
+ {
+ debugLog.printRTAriDebug (fn, "Found our delimeter, which was: '"+delimeter +"'");
+ aggregatedReceivedString = "";
+ return (true);
}
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception::: Nothing to flush out.");
+ }
+ }
+ return (false);
+ }
+
+ public boolean checkIfReceivedStringMatchesDelimeter(int len, String delimeter)
+ {
+ String fnName = "SshJcraftWrapper.checkIfReceivedStringMatchesDelimeter:::";
+ int x;
+ int c;
+ String str = null;
+
+ if (jcraftReadSwConfigFileFromDisk())
+ {
+ DebugLog.printAriDebug(fnName, "jcraftReadSwConfigFileFromDisk block");
+ File fileName = new File(routerFileName);
+ appendToFile(debugLogFileName, fnName +" jcraftReadSwConfigFileFromDisk::: Will read the tail end of the file from the disk");
+ try
+ {
+ str = getLastFewLinesOfFile(fileName, 3);
+ }
+ catch (IOException e)
+ {
+ DebugLog.printAriDebug(fnName, "Caught an Exception, e="+e);
+ dbLog.outputStackTrace(e);
+ e.printStackTrace();
+ }
+ }
+ else
+ {
+ // DebugLog.printAriDebug(fnName, "TRACE 1: ******************************");
+ // When looking at the end of the charBuffer, don't include any linefeeds or spaces. We only want to make the smallest string possible.
+ for(x=len-1; x>=0; x--)
+ {
+ c = charBuffer[x];
+ if (extraDebugFile.exists())
+ appendToFile(debugLogFileName, fnName +" x="+x +" c="+c +"\n");
+ if ((c != 10) && (c != 32)) // Not a line feed nor a space.
+ break;
+ }
+ if ((x+1 - 13) >= 0)
+ {
+ str = new String (charBuffer, (x+1-13), 13);
+ appendToFile(debugLogFileName, fnName +" str:'"+str +"'\n");
+ }
+ else
+ {
+ File fileName = new File(routerFileName);
+ appendToFile(debugLogFileName, fnName +" Will read the tail end of the file from the disk, x="+x +" len="+len +" str::'"+str +"' routerFileName='" +routerFileName +"'\n");
+ DebugLog.printAriDebug(fnName, "Will read the tail end of the file from the disk, x="+x +" len="+len +" str::'"+str +"' routerFileName='" +routerFileName +"'");
+ try
+ {
+ str = getLastFewLinesOfFile(fileName, 3);
}
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, ":Caught an Exception. e="+e);
+ catch (IOException e)
+ {
+ DebugLog.printAriDebug(fnName, "Caught an Exception, e="+e);
dbLog.outputStackTrace(e);
+ e.printStackTrace();
+ }
+ }
+ }
- throw new IOException(e.toString());
- }
- }
-
-
- public String receiveUntil (String delimeters, int timeout, String cmdThatWasSent) throws TimedOutException, IOException
- {
- String fn = "SshJcraftWrapper.receiveUntil";
- boolean match = false;
- boolean cliPromptCmd = false;
- StringBuffer sb2 = new StringBuffer();
- StringBuffer sbReceive = new StringBuffer();
- debugLog.printRTAriDebug (fn, "delimeters='"+delimeters +"' timeout="+timeout +" cmdThatWasSent='"+cmdThatWasSent +"'");
- appendToFile(debugLogFileName, fn +" delimeters='"+delimeters +"' timeout="+timeout +" cmdThatWasSent='"+cmdThatWasSent +"'\n");
- String CmdThatWasSent = removeWhiteSpaceAndNewLineCharactersAroundString(cmdThatWasSent);
- int readCounts = 0;
- aggregatedReceivedString = "";
-
- long deadline = new Date().getTime() + timeout;
- try
- {
- session.setTimeout(timeout); // This is the socket timeout value.
- while (!match)
- {
- if(new Date().getTime() > deadline)
- {
- debugLog.printRTAriDebug (fn, "Throwing a TimedOutException: time in routine has exceed our deadline: RouterName:"+
- RouterName +" CmdThatWasSent="+ CmdThatWasSent);
- throw new TimedOutException("Timeout: time in routine has exceed our deadline");
- }
- try
- {
- Thread.sleep(500);
- }
- catch (java.lang.InterruptedException ee)
- {
- boolean ignore = true;
- }
- int len = reader.read(charBuffer, 0, BUFFER_SIZE);
- appendToFile(debugLogFileName, fn +" After reader.read cmd: len="+len +"\n");
- if (len <= 0)
- {
- debugLog.printRTAriDebug (fn, "Reader read "+len +" bytes. Looks like we timed out, router="+RouterName);
- throw new TimedOutException ("Received a SocketTimeoutException router="+RouterName);
- }
- if (!cliPromptCmd)
- {
- if (cmdThatWasSent.indexOf("IOS_XR_uploadedSwConfigCmd") != -1)
- {
- if (out == null)
- {
- // This is a IOS XR sw config file. We will write it to the disk.
- timeout = timeout * 2;
- deadline = new Date().getTime() + timeout;
- debugLog.printRTAriDebug (fn, "IOS XR upload for software config: timeout="+timeout);
- StringTokenizer st = new StringTokenizer(cmdThatWasSent);
- st.nextToken();
- routerFileName = st.nextToken();
- out = new BufferedWriter(new FileWriter(routerFileName));
- routerLogFileName = "/tmp/"+RouterName;
- _tmpFile = new File(routerLogFileName);
- debugLog.printRTAriDebug (fn, "Will write the swConfigFile to disk, routerFileName="+routerFileName);
- }
- int c;
- out.write(charBuffer, 0, len);
- out.flush();
- appendToFile(debugLogFileName, fn +" Wrote "+len +" bytes to the disk\n");
- if (_tmpFile.exists())
- appendToRouterFile(routerLogFileName, len);
- match = checkIfReceivedStringMatchesDelimeter(len, "\nXML>");
- if (match == true)
- {
- out.flush();
- out.close();
- out = null;
- return null;
- }
- }
- else
- {
- readCounts ++;
- appendToFile(debugLogFileName, fn +" readCounts="+readCounts +" Reader read "+len +" of data\n");
- int c;
- sb2.setLength(0);
- for(int i=0; i<len; i++ )
- {
- c = charBuffer[i];
- if ((c != 7) && (c != 13) && (c != 0) && (c != 27))
- {
- sbReceive.append((char)charBuffer[i]);
- sb2.append((char)charBuffer[i]);
- }
- }
- appendToRouterFile("/tmp/"+RouterName, len);
- if (listener != null)
- listener.receivedString(sb2.toString());
-
- appendToFile(debugLogFileName, fn +" Trace 1\n");
- match = checkIfReceivedStringMatchesDelimeter(delimeters, sb2.toString(), cmdThatWasSent);
- appendToFile(debugLogFileName, fn +" Trace 2\n");
- if (match == true)
- {
- appendToFile(debugLogFileName, fn +" Match was true, breaking...\n");
- break;
- }
- }
- }
- else
- {
- debugLog.printRTAriDebug (fn, "cliPromptCmd, Trace 2");
- sb2.setLength(0);
- for(int i=0; i<len; i++ )
- {
- sbReceive.append( (char)charBuffer[i] );
- sb2.append( (char)charBuffer[i] );
- }
- appendToRouterFile("/tmp/"+RouterName, sb2);
- if (listener != null)
- listener.receivedString(sb2.toString());
- debugLog.printRTAriDebug (fn, "sb2='"+sb2.toString() +"' delimeters='" +delimeters +"'");
- if (sb2.toString().indexOf("\nariPrompt>") != -1)
- {
- debugLog.printRTAriDebug (fn, "Found our prompt");
- match = true;
- break;
- }
- }
- }
- }
- catch (JSchException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an JSchException e="+e.toString());
- dbLog.outputStackTrace(e);
- throw new TimedOutException (e.toString());
- }
- catch (IOException ee)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException: ee="+ee.toString());
- dbLog.outputStackTrace(ee);
- throw new TimedOutException (ee.toString());
- }
- String result = stripOffCmdFromRouterResponse(sbReceive.toString());
- debugLog.printRTAriDebug (fn, "Leaving method successfully");
- return (result);
- }
-
- public boolean checkIfReceivedStringMatchesDelimeter(String delimeters, String receivedString, String cmdThatWasSent)
- {
- // The delimeters are in a '|' seperated string. Return true on the first match.
- String fn = "SshJcraftWrapper.checkIfReceivedStringMatchesDelimeter";
- appendToFile(debugLogFileName, fn +" Entered: delimeters='"+delimeters +" cmdThatWasSent='"+cmdThatWasSent +"' receivedString='"+receivedString +"'\n");
- StringTokenizer st = new StringTokenizer(delimeters, "|");
-
- if ((delimeters.indexOf("#$") != -1) || (routerCmdType.equals("CLI"))) // This would be an IOS XR, CLI command.
- {
- int x = receivedString.lastIndexOf("#");
- int y = receivedString.length() - 1;
- appendToFile(debugLogFileName, fn +" IOS XR, CLI command\n");
- if (extraDebugFile.exists())
- appendToFile(debugLogFileName, fn +" :::cmdThatWasSent='"+cmdThatWasSent +"' x="+x +" y="+y +"\n");
- if ((x != -1) && (y == x))
- return(true);
- else
- return(false);
- }
- if (cmdThatWasSent.indexOf("show config") != -1)
- {
- appendToFile(debugLogFileName, fn +"In the block for 'show config'\n");
- while (st.hasMoreTokens())
- {
- String delimeter = st.nextToken();
- // Make sure we don't get faked out by a response of " #".
- // Proc #0
- // # signaling-local-address ipv6 FD00:F4D5:EA06:1::110:136:254
- // LAAR2#
- int x = receivedString.lastIndexOf(delimeter);
- if ((receivedString.lastIndexOf(delimeter) != -1) && (receivedString.lastIndexOf(" #") != x-1))
- {
- appendToFile(debugLogFileName, fn +"receivedString=\n'" +receivedString +"'\n");
- appendToFile(debugLogFileName, fn +"Returning true for the 'show config' command. We found our real delmeter. \n\n");
- return (true);
- }
- }
- }
- else
- {
- aggregatedReceivedString = aggregatedReceivedString + receivedString;
- _appendToFile ("/tmp/aggregatedReceivedString.debug", aggregatedReceivedString);
-
- while (st.hasMoreTokens())
- {
- String delimeter = st.nextToken();
- appendToFile(debugLogFileName, fn +" Looking for an delimeter of:'"+delimeter+"'\n");
- appendToFile(debugLogFileName, fn +" receivedString='"+receivedString);
- if (aggregatedReceivedString.indexOf(delimeter) != -1)
- {
- debugLog.printRTAriDebug (fn, "Found our delimeter, which was: '"+delimeter +"'");
- aggregatedReceivedString = "";
- return (true);
- }
- }
- }
- return (false);
- }
-
- public boolean checkIfReceivedStringMatchesDelimeter(int len, String delimeter)
- {
- String fnName = "SshJcraftWrapper.checkIfReceivedStringMatchesDelimeter:::";
- int x;
- int c;
- String str = null;
-
- if (jcraftReadSwConfigFileFromDisk())
- {
- DebugLog.printAriDebug(fnName, "jcraftReadSwConfigFileFromDisk block");
- File fileName = new File(routerFileName);
- appendToFile(debugLogFileName, fnName +" jcraftReadSwConfigFileFromDisk::: Will read the tail end of the file from the disk");
- try
- {
- str = getLastFewLinesOfFile(fileName, 3);
- }
- catch (IOException e)
- {
- DebugLog.printAriDebug(fnName, "Caught an Exception, e="+e);
- dbLog.outputStackTrace(e);
- e.printStackTrace();
- }
- }
- else
- {
- // DebugLog.printAriDebug(fnName, "TRACE 1: ******************************");
- // When looking at the end of the charBuffer, don't include any linefeeds or spaces. We only want to make the smallest string possible.
- for(x=len-1; x>=0; x--)
- {
- c = charBuffer[x];
- if (extraDebugFile.exists())
- appendToFile(debugLogFileName, fnName +" x="+x +" c="+c +"\n");
- if ((c != 10) && (c != 32)) // Not a line feed nor a space.
- break;
- }
- if ((x+1 - 13) >= 0)
- {
- str = new String (charBuffer, (x+1-13), 13);
- appendToFile(debugLogFileName, fnName +" str:'"+str +"'\n");
- }
- else
- {
- File fileName = new File(routerFileName);
- appendToFile(debugLogFileName, fnName +" Will read the tail end of the file from the disk, x="+x +
- " len="+len +" str::'"+str +"' routerFileName='" +routerFileName +"'\n");
- DebugLog.printAriDebug(fnName, "Will read the tail end of the file from the disk, x="+x +" len="
- +len +" str::'"+str +"' routerFileName='" +routerFileName +"'");
- try
- {
- str = getLastFewLinesOfFile(fileName, 3);
- }
- catch (IOException e)
- {
- DebugLog.printAriDebug(fnName, "Caught an Exception, e="+e);
- dbLog.outputStackTrace(e);
- e.printStackTrace();
- }
- }
- }
-
- if (str.indexOf(delimeter) != -1)
- {
- DebugLog.printAriDebug(fnName, "str in break is:'"+str +"'" +" delimeter='" +delimeter +"'");
- appendToFile(debugLogFileName, fnName +" str in break is:'"+str +" delimeter='" +delimeter +"'" +"'\n");
- return(true);
- }
- else
- {
- appendToFile(debugLogFileName, fnName +" Returning false");
- return(false);
- }
-
- }
-
- public void closeConnection()
- {
- String fn = "SshJcraftWrapper.closeConnection";
- debugLog.printRTAriDebug (fn, "Executing the closeConnection....");
- inputStream = null;
- outputStream = null;
- dis = null;
- charBuffer = null;
- session.disconnect();
+ if (str.indexOf(delimeter) != -1)
+ {
+ DebugLog.printAriDebug(fnName, "str in break is:'"+str +"'" +" delimeter='" +delimeter +"'");
+ appendToFile(debugLogFileName, fnName +" str in break is:'"+str +" delimeter='" +delimeter +"'" +"'\n");
+ return(true);
+ }
+ else
+ {
+ appendToFile(debugLogFileName, fnName +" Returning false");
+ return(false);
+ }
+
+ }
+
+ public void closeConnection()
+ {
+ String fn = "SshJcraftWrapper.closeConnection";
+ debugLog.printRTAriDebug (fn, "Executing the closeConnection....");
+ inputStream = null;
+ outputStream = null;
+ dis = null;
+ charBuffer = null;
+ session.disconnect();
session = null;
- }
+ }
- public void send (String cmd) throws IOException
- {
- String fn = "SshJcraftWrapper.send";
- OutputStream out = channel.getOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
+ public void send (String cmd) throws IOException
+ {
+ String fn = "SshJcraftWrapper.send";
+ OutputStream out = channel.getOutputStream();
+ DataOutputStream dos = new DataOutputStream(out);
- if ((cmd.charAt(cmd.length() - 1) != '\n') && (cmd.charAt(cmd.length() - 1) != '\r'))
- cmd += "\n";
+ if ((cmd.charAt(cmd.length() - 1) != '\n') && (cmd.charAt(cmd.length() - 1) != '\r'))
+ cmd += "\n";
int length = cmd.length();
int i = -1;
int nchars = 300000;
int ncharsTotalSent = 0;
int ncharsSent = 0;
- appendToFile(debugLogFileName, fn+": Sending: '"+cmd );
- debugLog.printRTAriDebug (fn, "Length of cmd is:" +length); // 2,937,706
- try
- {
+ appendToFile(debugLogFileName, fn+": Sending: '"+cmd );
+ // debugLog.printRTAriDebug (fn, "cmd = "+cmd);
+ debugLog.printRTAriDebug (fn, "Length of cmd is:" +length); // 2,937,706
+ try
+ {
if (length > 600000)
{
int timeout = 9000;
@@ -481,324 +484,332 @@ public class SshJcraftWrapper
String Cmd = cmd.substring(i, Math.min(length, i + nchars));
ncharsSent = Cmd.length();
ncharsTotalSent = ncharsTotalSent + Cmd.length();
- debugLog.printRTAriDebug (fn, "i="+i +" Sending Cmd: ncharsSent="+ncharsSent);
- dos.writeBytes(Cmd);
- dos.flush();
+ debugLog.printRTAriDebug (fn, "i="+i +" Sending Cmd: ncharsSent="+ncharsSent);
+ dos.writeBytes(Cmd);
+ dos.flush();
try
{
- debugLog.printRTAriDebug (fn, ":::i="+i +" length="+length);
+ debugLog.printRTAriDebug (fn, ":::i="+i +" length="+length);
if (ncharsSent < length)
- receiveUntilBufferFlush (ncharsSent, timeout, "buffer flush i="+i);
+ receiveUntilBufferFlush (ncharsSent, timeout, "buffer flush i="+i);
else
{
- debugLog.printRTAriDebug (fn, "i="+i +" No Waiting this time....");
- dos.flush();
+ debugLog.printRTAriDebug (fn, "i="+i +" No Waiting this time....");
+ dos.flush();
}
}
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception: Nothing to flush out.");
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception: Nothing to flush out.");
}
}
}
else
{
- debugLog.printRTAriDebug (fn, "Before executing the dos.writeBytes");
- dos.writeBytes(cmd);
+ debugLog.printRTAriDebug (fn, "Before executing the dos.writeBytes");
+ dos.writeBytes(cmd);
}
- dos.flush();
- debugLog.printRTAriDebug (fn, "Leaving method");
- appendToFile(debugLogFileName, fn+": Leaving method\n");
- }
- catch (IOException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
+ dos.flush();
+ debugLog.printRTAriDebug (fn, "Leaving method");
+ appendToFile(debugLogFileName, fn+": Leaving method\n");
+ }
+ catch (IOException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
dbLog.outputStackTrace(e);
- throw new IOException(e.toString());
- }
- }
-
-
- public void sendChar (int v) throws IOException
- {
- String fn = "SshJcraftWrapper.sendChar";
- OutputStream out = channel.getOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
- try
- {
- debugLog.printRTAriDebug (fn, "Sending: '" +v +"'");
- dos.writeChar (v);
- dos.flush();
- }
- catch (IOException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
- throw new IOException(e.toString());
- }
- }
-
- public void send (byte[] b, int off, int len) throws IOException
- {
- String fn = "SshJcraftWrapper.send:byte[]";
- OutputStream out = channel.getOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
- try
- {
- dos.write (b, off, len);
- dos.flush();
- }
- catch (IOException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
- throw new IOException(e.toString());
- }
- }
-
- public static class MyUserInfo implements UserInfo, UIKeyboardInteractive
- {
- public String getPassword()
- {
- return null;
- }
- public boolean promptYesNo(String str)
- {
- return false;
- }
- public String getPassphrase()
- {
- return null;
- }
- public boolean promptPassphrase(String message)
- {
- return false;
- }
- public boolean promptPassword(String message)
- {
- return false;
- }
- public void showMessage(String message)
- { }
- public String[] promptKeyboardInteractive(String destination,
- String name,
- String instruction,
- String[] prompt,
- boolean[] echo)
- {
- return null;
- }
- }
-
- public void addListener(TelnetListener listener)
- {
- this.listener = listener;
- }
-
- public void appendToFile (String fileName, String dataToWrite)
- {
- String fn = "SshJcraftWrapper.appendToFile";
-
- try
- {
- // First check to see if a file 'fileName' exist, if it does
- // write to it. If it does not exist, don't write to it.
- File tmpFile = new File(fileName);
- if (tmpFile.exists())
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
- out.write(getTheDate() +": " +tId +": "+dataToWrite);
- out.close();
- }
- }
- catch (IOException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException: e="+e);
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception: e="+e);
- }
- }
+ throw new IOException(e.toString());
+ }
+ }
+
+
+ public void sendChar (int v) throws IOException
+ {
+ String fn = "SshJcraftWrapper.sendChar";
+ OutputStream out = channel.getOutputStream();
+ DataOutputStream dos = new DataOutputStream(out);
+ try
+ {
+ debugLog.printRTAriDebug (fn, "Sending: '" +v +"'");
+ dos.writeChar (v);
+ dos.flush();
+ }
+ catch (IOException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
+ throw new IOException(e.toString());
+ }
+ }
+
+ public void send (byte[] b, int off, int len) throws IOException
+ {
+ String fn = "SshJcraftWrapper.send:byte[]";
+ OutputStream out = channel.getOutputStream();
+ DataOutputStream dos = new DataOutputStream(out);
+ try
+ {
+ dos.write (b, off, len);
+ dos.flush();
+ }
+ catch (IOException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
+ throw new IOException(e.toString());
+ }
+ }
+
+ public static class MyUserInfo implements UserInfo, UIKeyboardInteractive
+ {
+ public String getPassword()
+ {
+ return null;
+ }
+ public boolean promptYesNo(String str)
+ {
+ return false;
+ }
+ public String getPassphrase()
+ {
+ return null;
+ }
+ public boolean promptPassphrase(String message)
+ {
+ return false;
+ }
+ public boolean promptPassword(String message)
+ {
+ return false;
+ }
+ public void showMessage(String message)
+ { }
+ public String[] promptKeyboardInteractive(String destination,
+ String name,
+ String instruction,
+ String[] prompt,
+ boolean[] echo)
+ {
+ return null;
+ }
+ }
+
+ public void addListener(TelnetListener listener)
+ {
+ this.listener = listener;
+ }
+
+ public void appendToFile (String fileName, String dataToWrite)
+ {
+ String fn = "SshJcraftWrapper.appendToFile";
+
+ try
+ {
+ // First check to see if a file 'fileName' exist, if it does
+ // write to it. If it does not exist, don't write to it.
+ File tmpFile = new File(fileName);
+ if (tmpFile.exists())
+ {
+ BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
+ // out.write(dataToWrite);
+ // out.write(getTheDate() +": " +Thread.currentThread().getName() +": "+dataToWrite);
+ out.write(getTheDate() +": " +tId +": "+dataToWrite);
+ out.close();
+ }
+ }
+ catch (IOException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException: e="+e);
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception: e="+e);
+ }
+ }
public void _appendToFile (String fileName, String dataToWrite)
- {
- String fn = "SshJcraftWrapper.appendToFile";
-
- try
- {
- // First check to see if a file 'fileName' exist, if it does
- // write to it. If it does not exist, don't write to it.
- File tmpFile = new File(fileName);
- if (tmpFile.exists())
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
- out.write(dataToWrite);
- out.close();
- }
- }
- catch (IOException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException: e="+e);
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception: e="+e);
- }
- }
-
-
- public String getTheDate()
- {
- Calendar cal = Calendar.getInstance();
- java.util.Date today = cal.getTime();
- DateFormat df1 = DateFormat.getDateInstance();
- DateFormat df3 = new SimpleDateFormat("MM/dd/yyyy H:mm:ss ");
- return (df3.format(today));
- }
-
-
- public void appendToRouterFile (String fileName, StringBuffer dataToWrite)
- {
- String fnName = "SshJcraftWrapper.appendToRouterFile";
- debugLog.printRTAriDebug (fnName, "Entered.... ");
- try
- {
- // First check to see if a file 'fileName' exist, if it does
- // write to it. If it does not exist, don't write to it.
- File tmpFile = new File(fileName);
- {
- // if ((tmpFile.exists()) && (tmpFile.setWritable(true, true)))
- if (tmpFile.exists())
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
- out.write(dataToWrite.toString());
- out.close();
- }
- }
- }
- catch (IOException e)
- {
- System.err.println("writeToFile() exception: " + e);
- e.printStackTrace();
- }
- }
-
- public void appendToRouterFile (String fileName, int len)
- {
- String fnName = "SshJcraftWrapper.appendToFile";
- try
- {
- // First check to see if a file 'fileName' exist, if it does
- // write to it. If it does not exist, don't write to it.
- File tmpFile = new File(fileName);
- // if ((tmpFile.exists()) && (tmpFile.setWritable(true, true)))
- if (tmpFile.exists())
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
- out.write(charBuffer, 0, len);
- out.close();
- }
- }
- catch (IOException e)
- {
- System.err.println("writeToFile() exception: " + e);
- e.printStackTrace();
- }
- }
-
- public String removeWhiteSpaceAndNewLineCharactersAroundString(String str)
- {
- if (str != null)
- {
- StringTokenizer strTok = new StringTokenizer(str, "\n");
- StringBuffer sb = new StringBuffer();
-
- while (strTok.hasMoreTokens())
- {
- String line = strTok.nextToken();
- sb.append(line);
- }
- return (sb.toString().trim());
- }
- else
- return(str);
- }
-
- public String stripOffCmdFromRouterResponse(String routerResponse)
- {
- String fn = "SshJcraftWrapper.stripOffCmdFromRouterResponse";
- // appendToFile(debugLogFileName, fn+": routerResponse='"+routerResponse +"'\n");
-
- // The session of SSH will echo the command sent to the router, in the router's response.
- // Since all our commands are terminated by a '\n', strip off the first line
- // of the response from the router. This first line contains the orginal command.
-
- StringTokenizer rr = new StringTokenizer(routerResponse, "\n");
- StringBuffer sb = new StringBuffer();
-
- int numTokens = rr.countTokens();
- if (numTokens > 1)
- {
- rr.nextToken(); //Skip the first line.
- while (rr.hasMoreTokens())
- {
- sb.append(rr.nextToken()+'\n');
- }
- }
- return (sb.toString());
- }
-
- public void setRouterCommandType(String type)
- {
- String fn = "SshJcraftWrapper.setRouterCommandType";
- this.routerCmdType = type;
- debugLog.printRTAriDebug (fn, "Setting routerCmdType to a value of '"+type +"'");
- }
-
- public String getLastFewLinesOfFile(File file, int linesToRead) throws FileNotFoundException, IOException
- {
- String fn = "SshJcraftWrapper.getLastFewLinesOfFile";
- RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
- int lines = 0;
- StringBuilder builder = new StringBuilder();
- String tail = "";
- long length = file.length();
- length--;
- randomAccessFile.seek(length);
- for(long seek = length; seek >= 0; --seek)
- {
- randomAccessFile.seek(seek);
- char c = (char)randomAccessFile.read();
- builder.append(c);
- if(c == '\n')
- {
- builder = builder.reverse();
- tail = builder.toString() + tail;
- lines++;
- builder.setLength(0);
- if (lines == linesToRead)
- {
- break;
- }
- }
- }
- randomAccessFile.close();
- if(!jcraftReadSwConfigFileFromDisk())
- debugLog.printRTAriDebug (fn, "tail='"+tail +"'");
- appendToFile(debugLogFileName, "tail='"+tail +"'\n");
- return tail;
- }
-
- public boolean jcraftReadSwConfigFileFromDisk()
- {
- if (jcraftReadSwConfigFileFromDisk.exists())
- return(true);
- else
- return(false);
- }
+ {
+ String fn = "SshJcraftWrapper.appendToFile";
+
+ try
+ {
+ // First check to see if a file 'fileName' exist, if it does
+ // write to it. If it does not exist, don't write to it.
+ File tmpFile = new File(fileName);
+ if (tmpFile.exists())
+ {
+ BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
+ out.write(dataToWrite);
+ out.close();
+ }
+ }
+ catch (IOException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException: e="+e);
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception: e="+e);
+ }
+ }
+
+
+ public String getTheDate()
+ {
+ Calendar cal = Calendar.getInstance();
+ java.util.Date today = cal.getTime();
+ DateFormat df1 = DateFormat.getDateInstance();
+ DateFormat df3 = new SimpleDateFormat("MM/dd/yyyy H:mm:ss ");
+ return (df3.format(today));
+ }
+
+
+ public void appendToRouterFile (String fileName, StringBuffer dataToWrite)
+ {
+ String fnName = "SshJcraftWrapper.appendToRouterFile";
+ debugLog.printRTAriDebug (fnName, "Entered.... ");
+ try
+ {
+ // First check to see if a file 'fileName' exist, if it does
+ // write to it. If it does not exist, don't write to it.
+ File tmpFile = new File(fileName);
+ {
+ // if ((tmpFile.exists()) && (tmpFile.setWritable(true, true)))
+ if (tmpFile.exists())
+ {
+ BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
+ // out.write("<!-- "+getTheDate() +": " +tId +" -->\n");
+ out.write(dataToWrite.toString());
+ out.close();
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ System.err.println("writeToFile() exception: " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public void appendToRouterFile (String fileName, int len)
+ {
+ String fnName = "SshJcraftWrapper.appendToFile";
+ // debugLog.printRTAriDebug (fnName, "Entered.... len="+len);
+ try
+ {
+ // First check to see if a file 'fileName' exist, if it does
+ // write to it. If it does not exist, don't write to it.
+ File tmpFile = new File(fileName);
+ // if ((tmpFile.exists()) && (tmpFile.setWritable(true, true)))
+ if (tmpFile.exists())
+ {
+ BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
+ // out.write("<!-- "+getTheDate() +": " +tId +" -->\n");
+ out.write(charBuffer, 0, len);
+ out.close();
+ }
+ }
+ catch (IOException e)
+ {
+ System.err.println("writeToFile() exception: " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public String removeWhiteSpaceAndNewLineCharactersAroundString(String str)
+ {
+ if (str != null)
+ {
+ StringTokenizer strTok = new StringTokenizer(str, "\n");
+ StringBuffer sb = new StringBuffer();
+
+ while (strTok.hasMoreTokens())
+ {
+ String line = strTok.nextToken();
+ sb.append(line);
+ }
+ return (sb.toString().trim());
+ }
+ else
+ return(str);
+ }
+
+ public String stripOffCmdFromRouterResponse(String routerResponse)
+ {
+ String fn = "SshJcraftWrapper.stripOffCmdFromRouterResponse";
+ // appendToFile(debugLogFileName, fn+": routerResponse='"+routerResponse +"'\n");
+
+ // The session of SSH will echo the command sent to the router, in the router's response.
+ // Since all our commands are terminated by a '\n', strip off the first line
+ // of the response from the router. This first line contains the orginal command.
+
+ StringTokenizer rr = new StringTokenizer(routerResponse, "\n");
+ StringBuffer sb = new StringBuffer();
+
+ int numTokens = rr.countTokens();
+ // debugLog.printRTAriDebug (fn, "Number of lines in the response from the router is:" +numTokens);
+ if (numTokens > 1)
+ {
+ rr.nextToken(); //Skip the first line.
+ while (rr.hasMoreTokens())
+ {
+ sb.append(rr.nextToken()+'\n');
+ }
+ }
+ return (sb.toString());
+ }
+
+ public void setRouterCommandType(String type)
+ {
+ String fn = "SshJcraftWrapper.setRouterCommandType";
+ this.routerCmdType = type;
+ debugLog.printRTAriDebug (fn, "Setting routerCmdType to a value of '"+type +"'");
+ }
+
+ public String getLastFewLinesOfFile(File file, int linesToRead) throws FileNotFoundException, IOException
+ {
+ String fn = "SshJcraftWrapper.getLastFewLinesOfFile";
+ RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
+ int lines = 0;
+ StringBuilder builder = new StringBuilder();
+ String tail = "";
+ long length = file.length();
+ length--;
+ randomAccessFile.seek(length);
+ for(long seek = length; seek >= 0; --seek)
+ {
+ randomAccessFile.seek(seek);
+ char c = (char)randomAccessFile.read();
+ builder.append(c);
+ if(c == '\n')
+ {
+ builder = builder.reverse();
+ // System.out.println(builder.toString());
+ tail = builder.toString() + tail;
+ lines++;
+ builder.setLength(0);
+ if (lines == linesToRead)
+ {
+ break;
+ }
+ }
+ }
+ randomAccessFile.close();
+ if(!jcraftReadSwConfigFileFromDisk())
+ debugLog.printRTAriDebug (fn, "tail='"+tail +"'");
+ appendToFile(debugLogFileName, "tail='"+tail +"'\n");
+ return tail;
+ }
+
+ public boolean jcraftReadSwConfigFileFromDisk()
+ {
+ if (jcraftReadSwConfigFileFromDisk.exists())
+ return(true);
+ else
+ return(false);
+ }
public String getEquipNameCode()
{
return (equipNameCode);
+
}
public void setEquipNameCode(String equipNameCode)
@@ -812,58 +823,57 @@ public class SshJcraftWrapper
}
// Routine does reads until it has read 'nchars' or times out.
- public void receiveUntilBufferFlush (int ncharsSent, int timeout, String message) throws TimedOutException, IOException
- {
- String fn = "SshJcraftWrapper.receiveUntilBufferFlush";
- StringBuffer sb2 = new StringBuffer();
- StringBuffer sbReceive = new StringBuffer();
- debugLog.printRTAriDebug (fn, "ncharsSent="+ncharsSent+" timeout="+timeout +" "+message);
- int ncharsTotalReceived = 0;
- int ncharsRead = 0;
- boolean flag = false;
- charactersFromBufferFlush.setLength(0);
-
- long deadline = new Date().getTime() + timeout;
- logMemoryUsage();
- try
- {
- session.setTimeout(timeout); // This is the socket timeout value.
- while (true)
- {
- if(new Date().getTime() > deadline)
- {
- debugLog.printRTAriDebug (fn, "Throwing a TimedOutException: time in routine has exceed our deadline: ncharsSent="
- +ncharsSent+" ncharsTotalReceived="+ncharsTotalReceived);
- flag = true;
- throw new TimedOutException("Timeout: time in routine has exceed our deadline");
- }
- ncharsRead = reader.read(charBuffer, 0, BUFFER_SIZE);
- if (listener != null)
- listener.receivedString(String.copyValueOf(charBuffer,0,ncharsRead));
- appendToRouterFile("/tmp/"+RouterName, ncharsRead);
- ncharsTotalReceived = ncharsTotalReceived + ncharsRead;
- if (ncharsTotalReceived >= ncharsSent)
+ public void receiveUntilBufferFlush (int ncharsSent, int timeout, String message) throws TimedOutException, IOException
+ {
+ String fn = "SshJcraftWrapper.receiveUntilBufferFlush";
+ StringBuffer sb2 = new StringBuffer();
+ StringBuffer sbReceive = new StringBuffer();
+ debugLog.printRTAriDebug (fn, "ncharsSent="+ncharsSent+" timeout="+timeout +" "+message);
+ int ncharsTotalReceived = 0;
+ int ncharsRead = 0;
+ boolean flag = false;
+ charactersFromBufferFlush.setLength(0);
+
+ long deadline = new Date().getTime() + timeout;
+ logMemoryUsage();
+ try
+ {
+ session.setTimeout(timeout); // This is the socket timeout value.
+ while (true)
+ {
+ if(new Date().getTime() > deadline)
{
- debugLog.printRTAriDebug (fn, "Received the correct number of characters, ncharsSent="
- +ncharsSent +" ncharsTotalReceived="+ncharsTotalReceived);
- logMemoryUsage();
- return;
+ debugLog.printRTAriDebug (fn, "Throwing a TimedOutException: time in routine has exceed our deadline: ncharsSent="+ncharsSent+" ncharsTotalReceived="+ncharsTotalReceived);
+ flag = true;
+ throw new TimedOutException("Timeout: time in routine has exceed our deadline");
}
- }
- }
- catch (JSchException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an JSchException e="+e.toString());
- debugLog.printRTAriDebug (fn, "ncharsSent="+ncharsSent+" ncharsTotalReceived="+ncharsTotalReceived +" ncharsRead="+ncharsRead);
- throw new TimedOutException (e.toString());
- }
- }
+ ncharsRead = reader.read(charBuffer, 0, BUFFER_SIZE);
+ if (listener != null)
+ listener.receivedString(String.copyValueOf(charBuffer,0,ncharsRead));
+ appendToRouterFile("/tmp/"+RouterName, ncharsRead);
+ ncharsTotalReceived = ncharsTotalReceived + ncharsRead;
+ // debugLog.printRTAriDebug (fn, "::ncharsSent="+ncharsSent+" ncharsTotalReceived="+ncharsTotalReceived +" ncharsRead="+ncharsRead);
+ if (ncharsTotalReceived >= ncharsSent)
+ {
+ debugLog.printRTAriDebug (fn, "Received the correct number of characters, ncharsSent="+ncharsSent +" ncharsTotalReceived="+ncharsTotalReceived);
+ logMemoryUsage();
+ return;
+ }
+ }
+ }
+ catch (JSchException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an JSchException e="+e.toString());
+ debugLog.printRTAriDebug (fn, "ncharsSent="+ncharsSent+" ncharsTotalReceived="+ncharsTotalReceived +" ncharsRead="+ncharsRead);
+ throw new TimedOutException (e.toString());
+ }
+ }
public String getHostName()
{
return(hostName);
}
-
+
public String getUserName()
{
return(userName);
@@ -880,23 +890,24 @@ public class SshJcraftWrapper
try
{
Session sftpSession = jsch.getSession(userName, hostName, 22);
- UserInfo ui = new MyUserInfo();
- sftpSession.setPassword(passWord);
- sftpSession.setUserInfo(ui);
- sftpSession.connect(30*1000);
- debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
+ UserInfo ui = new MyUserInfo();
+ sftpSession.setPassword(passWord);
+ sftpSession.setUserInfo(ui);
+ sftpSession.connect(30*1000);
+ debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
- debugLog.printRTAriDebug (fn, "Connecting....");
+ debugLog.printRTAriDebug (fn, "Connecting....");
sftp.connect();
- debugLog.printRTAriDebug (fn, "Sending "+sourcePath +" --> "+destDirectory);
+ debugLog.printRTAriDebug (fn, "Sending "+sourcePath +" --> "+destDirectory);
sftp.put(sourcePath, destDirectory, ChannelSftp.OVERWRITE);
- debugLog.printRTAriDebug (fn, "Sent successfully");
+ debugLog.printRTAriDebug (fn, "Sent successfully");
sftpSession.disconnect();
}
catch (Exception e)
{
- debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
- throw new IOException(e.toString());
+ debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
+ // dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
+ throw new IOException(e.toString());
}
}
@@ -908,24 +919,25 @@ public class SshJcraftWrapper
try
{
Session sftpSession = jsch.getSession(userName, hostName, 22);
- UserInfo ui = new MyUserInfo();
- sftpSession.setPassword(passWord);
- sftpSession.setUserInfo(ui);
- sftpSession.connect(30*1000);
- debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
+ UserInfo ui = new MyUserInfo();
+ sftpSession.setPassword(passWord);
+ sftpSession.setUserInfo(ui);
+ sftpSession.connect(30*1000);
+ debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
- debugLog.printRTAriDebug (fn, "Connecting....");
+ debugLog.printRTAriDebug (fn, "Connecting....");
sftp.connect();
InputStream is = new ByteArrayInputStream(stringOfData.getBytes());
- debugLog.printRTAriDebug (fn, "Sending stringOfData --> "+fullPathDest);
+ debugLog.printRTAriDebug (fn, "Sending stringOfData --> "+fullPathDest);
sftp.put(is, fullPathDest, ChannelSftp.OVERWRITE);
- debugLog.printRTAriDebug (fn, "Sent successfully");
+ debugLog.printRTAriDebug (fn, "Sent successfully");
sftpSession.disconnect();
}
catch (Exception e)
{
- debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
- throw new IOException(e.toString());
+ debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
+ // dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
+ throw new IOException(e.toString());
}
}
@@ -935,27 +947,27 @@ public class SshJcraftWrapper
try
{
Session sftpSession = jsch.getSession(userName, hostName, 22);
- UserInfo ui = new MyUserInfo();
- sftpSession.setPassword(passWord);
- sftpSession.setUserInfo(ui);
- sftpSession.connect(30*1000);
- debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
+ UserInfo ui = new MyUserInfo();
+ sftpSession.setPassword(passWord);
+ sftpSession.setUserInfo(ui);
+ sftpSession.connect(30*1000);
+ debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
- debugLog.printRTAriDebug (fn, "Connecting....");
+ debugLog.printRTAriDebug (fn, "Connecting....");
sftp.connect();
InputStream in = null;
in = sftp.get(fullFilePathName);
String sftpFileString = readInputStreamAsString(in);
- debugLog.printRTAriDebug (fn, "Retreived successfully");
- // debugLog.printRTAriDebug (fn, "sftpFileString="+sftpFileString);
+ debugLog.printRTAriDebug (fn, "Retreived successfully");
+ // debugLog.printRTAriDebug (fn, "sftpFileString="+sftpFileString);
sftpSession.disconnect();
return(sftpFileString);
}
catch (Exception e)
{
- debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
+ debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
// dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
- throw new IOException(e.toString());
+ throw new IOException(e.toString());
}
}
@@ -978,97 +990,105 @@ public class SshJcraftWrapper
{
String fn = "SshJcraftWrapper.logMemoryUsage";
int mb = 1024*1024;
- long usedMemory;
- long maxMemoryAdvailable;
- long memoryLetfOnHeap;
- maxMemoryAdvailable = (runtime.maxMemory() / mb);
+ long usedMemory;
+ long maxMemoryAdvailable;
+ long memoryLetfOnHeap;
+ maxMemoryAdvailable = (runtime.maxMemory() / mb);
usedMemory = ((runtime.totalMemory()/mb) - (runtime.freeMemory()/mb));
memoryLetfOnHeap = maxMemoryAdvailable - usedMemory;
DebugLog.printAriDebug(fn, "maxMemoryAdvailable="+maxMemoryAdvailable +" usedMemory="+usedMemory +" memoryLetfOnHeap="+memoryLetfOnHeap);
}
+ // ----------------------------------------------------------------------------
+ // ----------------------------------------------------------------------------
+ // ----------------------------------------------------------------------------
+ // ----------------------------------------------------------------------------
- // User specifies the port number, and the subsystem
- public void connect (String hostname, String username, String password, String prompt, int timeOut, int portNum, String subsystem) throws IOException
- {
- String fn = "SshJcraftWrapper.connect";
-
- debugLog.printRTAriDebug (fn, ":::Attempting to connect to "+hostname +" username="+username +" password="+password + " prompt='"+prompt +"' timeOut="+timeOut +" portNum="+portNum +" subsystem="+subsystem);
- RouterName = hostname;
- jsch = new JSch();
- try
- {
- session = jsch.getSession(username, hostname, portNum);
- UserInfo ui = new MyUserInfo();
- session.setPassword(password);
- session.setUserInfo(ui);
- session.setConfig("StrictHostKeyChecking", "no");
- session.connect(timeOut);
- session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
- channel = session.openChannel("subsystem");
- ((ChannelSubsystem)channel).setSubsystem(subsystem);
- ((ChannelSubsystem)channel).setPty(true);
-
- inputStream = channel.getInputStream();
- dis = new DataInputStream(inputStream);
- reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
- channel.connect();
- debugLog.printRTAriDebug (fn, "Successfully connected.");
- debugLog.printRTAriDebug (fn, "Five second sleep....");
+
+ // User specifies the port number, and the subsystem
+ public void connect (String hostname, String username, String password, String prompt, int timeOut, int portNum, String subsystem) throws IOException
+ {
+ String fn = "SshJcraftWrapper.connect";
+
+ debugLog.printRTAriDebug (fn, ":::Attempting to connect to "+hostname +" username="+username +" password="+password + " prompt='"+prompt +"' timeOut="+timeOut +" portNum="+portNum +" subsystem="+subsystem);
+ RouterName = hostname;
+ jsch = new JSch();
+ try
+ {
+ session = jsch.getSession(username, hostname, portNum);
+ UserInfo ui = new MyUserInfo();
+ session.setPassword(password);
+ session.setUserInfo(ui);
+ session.setConfig("StrictHostKeyChecking", "no");
+ session.connect(timeOut);
+ session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
+ channel = session.openChannel("subsystem");
+ ((ChannelSubsystem)channel).setSubsystem(subsystem);
+ // ((ChannelSubsystem)channel).setPtyType("vt102");
+ ((ChannelSubsystem)channel).setPty(true);
+
+ inputStream = channel.getInputStream();
+ dis = new DataInputStream(inputStream);
+ reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
+ channel.connect();
+ debugLog.printRTAriDebug (fn, "Successfully connected.");
+ debugLog.printRTAriDebug (fn, "Five second sleep....");
try { Thread.sleep(5000); } catch (java.lang.InterruptedException ee) { boolean ignore = true; }
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception. e="+e);
- throw new IOException(e.toString());
- }
- }
-
- public void connect (String hostName, String username, String password, int portNumber) throws IOException
- {
- String fn = "SshJcraftWrapper.connect";
- jsch = new JSch();
- debugLog.printRTAriDebug (fn, "::Attempting to connect to "+hostName +" username="+username +" password="+password +" portNumber="+portNumber);
- debugLog.printRTAriDebug (fn, "Trace C");
- RouterName = hostName;
- this.hostName = hostName;
- userName = username;
- passWord = password;
- try
- {
- java.util.Properties config = new java.util.Properties();
- config.put("StrictHostKeyChecking", "no");
- session = jsch.getSession(username, hostName, 22);
- UserInfo ui = new MyUserInfo();
- session.setConfig(config);
- session.setPassword(password);
- session.setUserInfo(ui);
- session.connect(30000);
- channel = session.openChannel("shell");
- session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
- ((ChannelShell)channel).setPtyType("vt102");
- inputStream = channel.getInputStream();
- dis = new DataInputStream(inputStream);
- reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
- channel.connect();
- debugLog.printRTAriDebug (fn, "::Successfully connected.");
- debugLog.printRTAriDebug (fn, "::Flushing input buffer");
- try
- {
- receiveUntil(":~#", 9000, "No cmd was sent, just waiting, but we can stop on a '~#'");
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception::: Nothing to flush out.");
- }
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception. e="+e);
+ throw new IOException(e.toString());
+ }
+ }
+
+ public void connect (String hostName, String username, String password, int portNumber) throws IOException
+ {
+ String fn = "SshJcraftWrapper.connect";
+ jsch = new JSch();
+ debugLog.printRTAriDebug (fn, "::Attempting to connect to "+hostName +" username="+username +" password="+password +" portNumber="+portNumber);
+ debugLog.printRTAriDebug (fn, "Trace C");
+ RouterName = hostName;
+ this.hostName = hostName;
+ userName = username;
+ passWord = password;
+ try
+ {
+ java.util.Properties config = new java.util.Properties();
+ config.put("StrictHostKeyChecking", "no");
+ session = jsch.getSession(username, hostName, 22);
+ // session = jsch.getSession(username, hostName, portNumber);
+ UserInfo ui = new MyUserInfo();
+ session.setConfig(config);
+ session.setPassword(password);
+ session.setUserInfo(ui);
+ session.connect(30000);
+ channel = session.openChannel("shell");
+ session.setServerAliveCountMax(0); // If this is not set to '0', then socket timeout on all reads will not work!!!!
+ ((ChannelShell)channel).setPtyType("vt102");
+ inputStream = channel.getInputStream();
+ dis = new DataInputStream(inputStream);
+ reader = new BufferedReader(new InputStreamReader(dis), BUFFER_SIZE);
+ channel.connect();
+ debugLog.printRTAriDebug (fn, "::Successfully connected.");
+ debugLog.printRTAriDebug (fn, "::Flushing input buffer");
+ try
+ {
+ receiveUntil(":~#", 9000, "No cmd was sent, just waiting, but we can stop on a '~#'");
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception::: Nothing to flush out.");
+ }
- }
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception. e="+e);
- throw new IOException(e.toString());
- }
- }
+ }
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception. e="+e);
+ // dbLog.storeData("ErrorMsg= Exception trying to connect to "+hostName +" "+e);
+ throw new IOException(e.toString());
+ }
+ }
public void put(String sourcePath, String destDirectory) throws IOException
@@ -1076,24 +1096,25 @@ public class SshJcraftWrapper
String fn = "SshJcraftWrapper.sftp";
try
{
- Session sftpSession = jsch.getSession(userName, hostName, 22);
- UserInfo ui = new MyUserInfo();
- sftpSession.setPassword(passWord);
- sftpSession.setUserInfo(ui);
- sftpSession.connect(30*1000);
- debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
- ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
- debugLog.printRTAriDebug (fn, "Connecting....");
- sftp.connect();
- debugLog.printRTAriDebug (fn, "Sending "+sourcePath +" --> "+destDirectory);
- sftp.put(sourcePath, destDirectory, ChannelSftp.OVERWRITE);
- debugLog.printRTAriDebug (fn, "Sent successfully");
+ Session sftpSession = jsch.getSession(userName, hostName, 22);
+ UserInfo ui = new MyUserInfo();
+ sftpSession.setPassword(passWord);
+ sftpSession.setUserInfo(ui);
+ sftpSession.connect(30*1000);
+ debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
+ ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
+ debugLog.printRTAriDebug (fn, "Connecting....");
+ sftp.connect();
+ debugLog.printRTAriDebug (fn, "Sending "+sourcePath +" --> "+destDirectory);
+ sftp.put(sourcePath, destDirectory, ChannelSftp.OVERWRITE);
+ debugLog.printRTAriDebug (fn, "Sent successfully");
sftpSession.disconnect();
}
catch (Exception e)
{
- debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
- throw new IOException(e.toString());
+ debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
+ // dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
+ throw new IOException(e.toString());
}
}
@@ -1103,36 +1124,48 @@ public class SshJcraftWrapper
Session sftpSession = null;
try
{
- debugLog.printRTAriDebug (fn, "userName="+userName +" hostName="+hostName +" passWord="+passWord);
- jsch = new JSch();
+ debugLog.printRTAriDebug (fn, "userName="+userName +" hostName="+hostName +" passWord="+passWord);
+ jsch = new JSch();
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
sftpSession = jsch.getSession(userName, hostName, 22);
- UserInfo ui = new MyUserInfo();
- sftpSession.setPassword(passWord);
- sftpSession.setUserInfo(ui);
+ UserInfo ui = new MyUserInfo();
+ sftpSession.setPassword(passWord);
+ sftpSession.setUserInfo(ui);
sftpSession.setConfig(config);
- sftpSession.connect(30*1000);
- debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
+ sftpSession.connect(30*1000);
+ debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
- debugLog.printRTAriDebug (fn, "Connecting....");
+ debugLog.printRTAriDebug (fn, "Connecting....");
sftp.connect();
String oldFiles = fullPathDest +"*";
- debugLog.printRTAriDebug (fn, "Deleting old files --> "+oldFiles);
- sftp.rm(oldFiles);
- debugLog.printRTAriDebug (fn, "Sending stringOfData --> "+fullPathDest);
+ debugLog.printRTAriDebug (fn, "Deleting old files --> "+oldFiles);
+ try{
+ sftp.rm(oldFiles);
+ debugLog.printRTAriDebug (fn, "Sending stringOfData --> "+fullPathDest);
+ }
+ catch(SftpException sft){
+ String exp = "No such file";
+ if(sft.getMessage()!=null && sft.getMessage().contains(exp))
+ debugLog.printRTAriDebug (fn, "No files found -- Continue");
+ else{
+ debugLog.printRTAriDebug (fn, "Exception while sftp.rm " + sft.getMessage());
+ sft.printStackTrace();
+ throw sft;
+ }
+ }
sftp.put(is, fullPathDest, ChannelSftp.OVERWRITE);
- debugLog.printRTAriDebug (fn, "Sent successfully");
+ debugLog.printRTAriDebug (fn, "Sent successfully");
sftpSession.disconnect();
sftpSession = null;
}
catch (Exception e)
{
- debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
+ debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
sftpSession.disconnect();
sftpSession = null;
// dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
- throw new IOException(e.toString());
+ throw new IOException(e.toString());
}
}
@@ -1143,57 +1176,57 @@ public class SshJcraftWrapper
Session sftpSession = null;
try
{
- debugLog.printRTAriDebug (fn, "userName="+userName +" hostName="+hostName +" passWord="+passWord);
- jsch = new JSch();
+ debugLog.printRTAriDebug (fn, "userName="+userName +" hostName="+hostName +" passWord="+passWord);
+ jsch = new JSch();
sftpSession = jsch.getSession(userName, hostName, 22);
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
- UserInfo ui = new MyUserInfo();
- sftpSession.setPassword(passWord);
- sftpSession.setUserInfo(ui);
+ UserInfo ui = new MyUserInfo();
+ sftpSession.setPassword(passWord);
+ sftpSession.setUserInfo(ui);
sftpSession.setConfig(config);
- sftpSession.connect(30*1000);
- debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
+ sftpSession.connect(30*1000);
+ debugLog.printRTAriDebug (fn, "Opening up an sftp channel....");
ChannelSftp sftp=(ChannelSftp)sftpSession.openChannel("sftp");
- debugLog.printRTAriDebug (fn, "Connecting....");
+ debugLog.printRTAriDebug (fn, "Connecting....");
sftp.connect();
InputStream in = null;
in = sftp.get(fullFilePathName);
String sftpFileString = readInputStreamAsString(in);
- debugLog.printRTAriDebug (fn, "Retreived successfully");
- // debugLog.printRTAriDebug (fn, "sftpFileString="+sftpFileString);
+ debugLog.printRTAriDebug (fn, "Retreived successfully");
+ // debugLog.printRTAriDebug (fn, "sftpFileString="+sftpFileString);
sftpSession.disconnect();
sftpSession = null;
return(sftpFileString);
}
catch (Exception e)
{
- debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
+ debugLog.printRTAriDebug (fn, "Caught an Exception, e="+e);
sftpSession.disconnect();
sftpSession = null;
// dbLog.storeData("ErrorMsg= sftp threw an Exception. error is:"+e);
- throw new IOException(e.toString());
+ throw new IOException(e.toString());
}
}
public String send(String cmd, String delimiter) throws IOException
- {
- String fn = "SshJcraftWrapper.send";
- OutputStream out = channel.getOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
+ {
+ String fn = "SshJcraftWrapper.send";
+ OutputStream out = channel.getOutputStream();
+ DataOutputStream dos = new DataOutputStream(out);
- if ((cmd.charAt(cmd.length() - 1) != '\n') && (cmd.charAt(cmd.length() - 1) != '\r'))
- cmd += "\n";
+ if ((cmd.charAt(cmd.length() - 1) != '\n') && (cmd.charAt(cmd.length() - 1) != '\r'))
+ cmd += "\n";
int length = cmd.length();
int i = -1;
int nchars = 300000;
int ncharsTotalSent = 0;
int ncharsSent = 0;
- debugLog.printRTAriDebug (fn, "Length of cmd is:" +length); // 2,937,706
- debugLog.printRTAriDebug (fn, "Length of cmd is:" +length); // 2,937,706
- try
- {
+ debugLog.printRTAriDebug (fn, "Length of cmd is:" +length); // 2,937,706
+ debugLog.printRTAriDebug (fn, "Length of cmd is:" +length); // 2,937,706
+ try
+ {
if (length > 600000)
{
int timeout = 9000;
@@ -1202,42 +1235,43 @@ public class SshJcraftWrapper
String Cmd = cmd.substring(i, Math.min(length, i + nchars));
ncharsSent = Cmd.length();
ncharsTotalSent = ncharsTotalSent + Cmd.length();
- debugLog.printRTAriDebug (fn, "i="+i +" Sending Cmd: ncharsSent="+ncharsSent);
- dos.writeBytes(Cmd);
- dos.flush();
+ debugLog.printRTAriDebug (fn, "i="+i +" Sending Cmd: ncharsSent="+ncharsSent);
+ dos.writeBytes(Cmd);
+ dos.flush();
try
{
- debugLog.printRTAriDebug (fn, ":::i="+i +" length="+length);
+ debugLog.printRTAriDebug (fn, ":::i="+i +" length="+length);
if (ncharsSent < length)
- receiveUntilBufferFlush (ncharsSent, timeout, "buffer flush i="+i);
+ receiveUntilBufferFlush (ncharsSent, timeout, "buffer flush i="+i);
else
{
- debugLog.printRTAriDebug (fn, "i="+i +" No Waiting this time....");
- dos.flush();
+ debugLog.printRTAriDebug (fn, "i="+i +" No Waiting this time....");
+ dos.flush();
}
}
- catch (Exception e)
- {
- debugLog.printRTAriDebug (fn, "Caught an Exception: Nothing to flush out.");
+ catch (Exception e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an Exception: Nothing to flush out.");
}
}
}
else
{
- debugLog.printRTAriDebug (fn, "Before executing the dos.writeBytes");
- dos.writeBytes(cmd);
+ debugLog.printRTAriDebug (fn, "Before executing the dos.writeBytes");
+ dos.writeBytes(cmd);
}
- dos.flush();
+ dos.flush();
// Now lets get the response.
String response = receiveUntil (delimiter, 300000, cmd);
- debugLog.printRTAriDebug (fn, "Leaving method");
+ debugLog.printRTAriDebug (fn, "Leaving method");
return(response);
- }
- catch (IOException e)
- {
- debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
- throw new IOException(e.toString());
- }
- }
+ }
+ catch (IOException e)
+ {
+ debugLog.printRTAriDebug (fn, "Caught an IOException. e="+e);
+ throw new IOException(e.toString());
+ }
+ }
+
}
diff --git a/appc-config/appc-data-services/features/src/main/resources/features.xml b/appc-config/appc-data-services/features/src/main/resources/features.xml
index 296a509be..4546a8164 100644
--- a/appc-config/appc-data-services/features/src/main/resources/features.xml
+++ b/appc-config/appc-data-services/features/src/main/resources/features.xml
@@ -31,7 +31,7 @@
<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
<feature version="${broker-mdsal.version}">odl-mdsal-broker</feature>
- <feature version="${sdnc.dblib.version}">sdnc-dblib</feature>
+ <feature version="${sdnctl.dblib.version}">sdnc-dblib</feature>
<feature version="${sdnc.sli.version}">sdnc-sli</feature>
<feature version="${openecomp.sdnc.sql-resource.version}">sdnc-sql-resource</feature>
diff --git a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java
index 3c958df38..f59a88749 100644
--- a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java
+++ b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java
@@ -178,9 +178,9 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin {
if (status == QueryStatus.NOT_FOUND) {
- status = db.getTemplateByVnfType(ctx, responsePrefix, fileCategory);
+ //status = db.getTemplateByVnfType(ctx, responsePrefix, fileCategory);
- if (status == QueryStatus.NOT_FOUND || status == QueryStatus.FAILURE)
+ //if (status == QueryStatus.NOT_FOUND || status == QueryStatus.FAILURE)
throw new Exception("Unable to Read " + fileCategory );
}
}
diff --git a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_CheckConfigStatus.json b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_CheckConfigStatus.json
index aea9a85b9..7bf35074e 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_CheckConfigStatus.json
+++ b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_CheckConfigStatus.json
@@ -18,4 +18,4 @@
* ============LICENSE_END=========================================================
*/
-[{"id":"cf792cb4.c5fc1","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":508,"y":276,"z":"149c03da.6855dc","wires":[["bccec7e0.e85648"]]},{"id":"e3067cb4.9cbc5","type":"dgstart","name":"DGSTART","outputs":1,"x":158,"y":105,"z":"149c03da.6855dc","wires":[["c9b8010d.5b259"]]},{"id":"c9b8010d.5b259","type":"service-logic","name":"APPC 4.0.0","module":"APPC","version":"4.0.0","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='4.0.0'>","outputs":1,"x":334,"y":102,"z":"149c03da.6855dc","wires":[["f3b373c9.7c789"]]},{"id":"f3b373c9.7c789","type":"method","name":"method CheckConfigStatus","xml":"<method rpc='CheckConfigStatus' mode='sync'>\n","comments":"","outputs":1,"x":562,"y":103,"z":"149c03da.6855dc","wires":[["a3a82482.ab3f28"]]},{"id":"4e43662a.ee91c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":158,"y":233,"z":"149c03da.6855dc","wires":[["7005d829.ad8ca8","be1359f3.76fed8"]]},{"id":"a3963266.b475c","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":496,"y":458,"z":"149c03da.6855dc","wires":[["665ac5e1.5e6cfc"]]},{"id":"665ac5e1.5e6cfc","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":646,"y":460,"z":"149c03da.6855dc","wires":[["db84df7.6a6322"]]},{"id":"7005d829.ad8ca8","type":"configure","name":"configure: SftpAdaptor: GetConfig Success ","xml":"<configure adaptor=\"org.openecomp.appc.ccadaptor.ConfigComponentAdaptor\" key=\"get\">\n<parameter name=\"host\" value=\"`$vnf-host-ip-address`\"/>\n<parameter name=\"loginId\" value=\"`$device-authentication.USER-NAME`\"/>\n<parameter name=\"password\" value=\"`$device-authentication.PASSWORD`\"/>\n<parameter name=\"fullPathFileName\" value=\"`$configfilereference-success.TARGET-FILE-PATH`\"/>\t\n\n","comments":"","outputs":1,"x":257,"y":396,"z":"149c03da.6855dc","wires":[["cf792cb4.c5fc1","a3963266.b475c","608cebd8.10b624"]]},{"id":"db84df7.6a6322","type":"configure","name":"configure: SftpAdaptor: GetConfig Failure","xml":"<configure adaptor=\"org.openecomp.appc.ccadaptor.ConfigComponentAdaptor\" key=\"get\">\n<parameter name=\"host\" value=\"`$vnf-host-ip-address`\"/>\n<parameter name=\"loginId\" value=\"`$device-authentication.USER-NAME`\"/>\n<parameter name=\"password\" value=\"`$device-authentication.PASSWORD`\"/>\n<parameter name=\"fullPathFileName\" value=\"`$configfilereference-failure.TARGET-FILE-PATH`\"/>\n","comments":"","outputs":1,"x":901,"y":460,"z":"149c03da.6855dc","wires":[["f017767.f98fb88","6cde3091.955c1","49953086.03f73"]]},{"id":"f017767.f98fb88","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":585,"y":573,"z":"149c03da.6855dc","wires":[["11221226.6595fe"]]},{"id":"11221226.6595fe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":752,"y":576,"z":"149c03da.6855dc","wires":[["5e6a6545.c05b8c"]]},{"id":"5e6a6545.c05b8c","type":"configure","name":"configure: SftpAdaptor: GetConfig FailureLog","xml":"<configure adaptor=\"org.openecomp.appc.ccadaptor.ConfigComponentAdaptor\" key=\"get\">\n<parameter name=\"host\" value=\"`$vnf-host-ip-address`\"/>\n<parameter name=\"loginId\" value=\"`$device-authentication.USER-NAME`\"/>\n<parameter name=\"password\" value=\"`$device-authentication.PASSWORD`\"/>\n<parameter name=\"fullPathFileName\" value=\"`$configfilereference-log.TARGET-FILE-PATH`\"/>\n\n","comments":"","outputs":1,"x":1032,"y":580,"z":"149c03da.6855dc","wires":[["43dc78f.d70fe88","86972c32.24588"]]},{"id":"43dc78f.d70fe88","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1333,"y":535,"z":"149c03da.6855dc","wires":[["7fb331c5.b68e"]]},{"id":"6cde3091.955c1","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":608,"y":912,"z":"149c03da.6855dc","wires":[["72e676b9.bf2c98"]]},{"id":"41419e5b.e511b","type":"comment","name":"No Success or Failure found","info":"","comments":"","x":264.5,"y":777,"z":"149c03da.6855dc","wires":[]},{"id":"2603ea5d.3a5926","type":"for","name":"for: check status 10 times","xml":"<for index=\"i\" start=\"0\" end=\"10\" >","comments":"","outputs":1,"x":395,"y":160,"z":"149c03da.6855dc","wires":[["4e43662a.ee91c8"]]},{"id":"a3a82482.ab3f28","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":165,"y":162,"z":"149c03da.6855dc","wires":[["2603ea5d.3a5926"]]},{"id":"765b71e8.9bbd8","type":"switchNode","name":"switch: Max retries done?","xml":"<switch test=\"`$i`\">\n","comments":"","outputs":1,"x":979,"y":905,"z":"149c03da.6855dc","wires":[["8f38ae81.92268","472f2e84.4a902"]]},{"id":"8f38ae81.92268","type":"other","name":"outcome: 9","xml":"<outcome value='9'>\n","comments":"","outputs":1,"x":1231,"y":893,"z":"149c03da.6855dc","wires":[["a37d5533.1da868"]]},{"id":"a37d5533.1da868","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1417,"y":887,"z":"149c03da.6855dc","wires":[["b0e805d3.642a98"]]},{"id":"72e676b9.bf2c98","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":772,"y":911,"z":"149c03da.6855dc","wires":[["765b71e8.9bbd8"]]},{"id":"b5b9181.2439fe8","type":"comment","name":"Return Failure so that it exits immediately","info":"Error Code and message reflect the status\nReturning success doesnt exit the loop","comments":"","x":884.5,"y":229,"z":"149c03da.6855dc","wires":[]},{"id":"b0e805d3.642a98","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"Configuration Failed. No configuration success or error file found on the device\" />\n<parameter name=\"error-code\" value=\"401\" />\n\n","comments":"","x":1608,"y":884,"z":"149c03da.6855dc","wires":[]},{"id":"be1359f3.76fed8","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"RETRY ATTEMPT START\" value=\"`$i`\"/>\n","comments":"","outputs":1,"x":343,"y":227,"z":"149c03da.6855dc","wires":[[]]},{"id":"472f2e84.4a902","type":"other","name":"outcome: Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1229,"y":971,"z":"149c03da.6855dc","wires":[["f68d7d4.f244e8"]]},{"id":"f68d7d4.f244e8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1412,"y":969,"z":"149c03da.6855dc","wires":[["8aa4ad89.38ccd"]]},{"id":"8aa4ad89.38ccd","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"RETRYATTEMPT DONE\"/>\n<parameter name=\"field3\" value=\"`$i`\"/>\n\n\n\n","comments":"","outputs":1,"x":1589,"y":965,"z":"149c03da.6855dc","wires":[[]]},{"id":"608cebd8.10b624","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":521,"y":367,"z":"149c03da.6855dc","wires":[["e9e7c95d.e9fa38"]]},{"id":"e9e7c95d.e9fa38","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":689,"y":371,"z":"149c03da.6855dc","wires":[["8006e9e7.14c678"]]},{"id":"8006e9e7.14c678","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"Unable to call SftpAdaptor\" />\n<parameter name=\"error-code\" value=\"401\" />\n ","comments":"","x":868,"y":377,"z":"149c03da.6855dc","wires":[]},{"id":"49953086.03f73","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":618,"y":734,"z":"149c03da.6855dc","wires":[["b1054c2b.0bbe"]]},{"id":"b1054c2b.0bbe","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":818,"y":730,"z":"149c03da.6855dc","wires":[["46d2d7c9.7eb048"]]},{"id":"46d2d7c9.7eb048","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"Configuration request Failed. Unable to get Failure Log\" />\n<parameter name=\"error-code\" value=\"401\" />","comments":"","x":1045,"y":731,"z":"149c03da.6855dc","wires":[]},{"id":"86972c32.24588","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1332,"y":607,"z":"149c03da.6855dc","wires":[["b1054c2b.0bbe"]]},{"id":"533f25ea.9ce72c","type":"comment","name":"Set Success Code","info":"","comments":"","x":1055,"y":280,"z":"149c03da.6855dc","wires":[]},{"id":"bccec7e0.e85648","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":671,"y":276,"z":"149c03da.6855dc","wires":[["d3cadd1d.064f3"]]},{"id":"d3cadd1d.064f3","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"SUCCESS - request has been processed successfully\" />\n<parameter name=\"error-code\" value=\"400\" />\n","comments":"","x":870,"y":278,"z":"149c03da.6855dc","wires":[]},{"id":"7fb331c5.b68e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1523,"y":533,"z":"149c03da.6855dc","wires":[["1f59c702.997229"]]},{"id":"1f59c702.997229","type":"execute","name":"execute ParseErrorLog","xml":"<execute plugin=\"org.openecomp.sdnc.config.generator.pattern.PatternNode\" method=\"parseErrorLog\">\n<parameter name=\"logData\" value=\"`$fileContents`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.patternNode\" />","comments":"","outputs":1,"x":1771,"y":530,"z":"149c03da.6855dc","wires":[["b7287d41.8c10e","216d890f.351086","8c0158c.48e0ca8"]]},{"id":"b7287d41.8c10e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2007,"y":506,"z":"149c03da.6855dc","wires":[["102db338.b4eddd"]]},{"id":"216d890f.351086","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2012,"y":567,"z":"149c03da.6855dc","wires":[["3185417d.f7dd5e"]]},{"id":"102db338.b4eddd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2168,"y":507,"z":"149c03da.6855dc","wires":[["f9637605.9c3138"]]},{"id":"3185417d.f7dd5e","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2164,"y":570,"z":"149c03da.6855dc","wires":[["b1314121.4c725"]]},{"id":"b1314121.4c725","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"Configuration has failed.Unable to process error log\"/>\n\t","comments":"","x":2346,"y":571,"z":"149c03da.6855dc","wires":[]},{"id":"f9637605.9c3138","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`$tmp.patternNode.error-message`\"/>\n\t\n\t","comments":"","x":2366,"y":508,"z":"149c03da.6855dc","wires":[]},{"id":"8c0158c.48e0ca8","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1991,"y":635,"z":"149c03da.6855dc","wires":[["d19e527d.d65cd"]]},{"id":"d19e527d.d65cd","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2147,"y":637,"z":"149c03da.6855dc","wires":[["985669a3.270458"]]},{"id":"985669a3.270458","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`'Configuration has failed.' + $tmp.patternNode.parsedError`\"/>\n\t","comments":"","x":2319,"y":635,"z":"149c03da.6855dc","wires":[]}]
+[{"id":"106f1811.00d7f8","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":541.6666259765625,"y":274,"z":"fcbb9888.37da88","wires":[["aa91d71.164a828"]]},{"id":"ba538e68.3fffc","type":"dgstart","name":"DGSTART","outputs":1,"x":191.6666259765625,"y":103,"z":"fcbb9888.37da88","wires":[["99bedc14.e0ea6"]]},{"id":"99bedc14.e0ea6","type":"service-logic","name":"APPC 4.0.0","module":"APPC","version":"4.0.0","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='4.0.0'>","outputs":1,"x":367.6666259765625,"y":100,"z":"fcbb9888.37da88","wires":[["9569d318.33ae1"]]},{"id":"9569d318.33ae1","type":"method","name":"method CheckConfigStatus","xml":"<method rpc='CheckConfigStatus' mode='sync'>\n","comments":"","outputs":1,"x":595.6666259765625,"y":101,"z":"fcbb9888.37da88","wires":[["1d7bf2cd.2246ad"]]},{"id":"beea047c.66a218","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":191.6666259765625,"y":231,"z":"fcbb9888.37da88","wires":[["c1a4aa3d.35dfa8","498b7be.6025a84"]]},{"id":"813ad4a9.666118","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":529.6666259765625,"y":459.3333349227905,"z":"fcbb9888.37da88","wires":[["20644748.1c68c8"]]},{"id":"20644748.1c68c8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":679.6666259765625,"y":461.3333349227905,"z":"fcbb9888.37da88","wires":[["1813e90b.add1c7"]]},{"id":"c1a4aa3d.35dfa8","type":"configure","name":"configure: SftpAdaptor: GetConfig Success ","xml":"<configure adaptor=\"org.openecomp.appc.ccadaptor.ConfigComponentAdaptor\" key=\"get\">\n<parameter name=\"host\" value=\"`$vnf-host-ip-address`\"/>\n<parameter name=\"loginId\" value=\"`$device-authentication.USER-NAME`\"/>\n<parameter name=\"password\" value=\"`$device-authentication.PASSWORD`\"/>\n<parameter name=\"fullPathFileName\" value=\"`$configfilereference-success.TARGET-FILE-PATH`\"/>\t\n\n","comments":"","outputs":1,"x":262.3332824707031,"y":367.33333015441895,"z":"fcbb9888.37da88","wires":[["106f1811.00d7f8","813ad4a9.666118","44876ee3.fc9e2"]]},{"id":"1813e90b.add1c7","type":"configure","name":"configure: SftpAdaptor: GetConfig Failure","xml":"<configure adaptor=\"org.openecomp.appc.ccadaptor.ConfigComponentAdaptor\" key=\"get\">\n<parameter name=\"host\" value=\"`$vnf-host-ip-address`\"/>\n<parameter name=\"loginId\" value=\"`$device-authentication.USER-NAME`\"/>\n<parameter name=\"password\" value=\"`$device-authentication.PASSWORD`\"/>\n<parameter name=\"fullPathFileName\" value=\"`$configfilereference-failure.TARGET-FILE-PATH`\"/>\n","comments":"","outputs":1,"x":934.6666259765625,"y":461.3333349227905,"z":"fcbb9888.37da88","wires":[["c9e9d49f.3027a8","215ca65e.28efea","54a1451e.6ee1bc"]]},{"id":"c9e9d49f.3027a8","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":618.6666259765625,"y":571,"z":"fcbb9888.37da88","wires":[["9e7471e8.24d1d"]]},{"id":"9e7471e8.24d1d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":785.6666259765625,"y":574,"z":"fcbb9888.37da88","wires":[["9e02dd6f.a11ce"]]},{"id":"9e02dd6f.a11ce","type":"configure","name":"configure: SftpAdaptor: GetConfig FailureLog","xml":"<configure adaptor=\"org.openecomp.appc.ccadaptor.ConfigComponentAdaptor\" key=\"get\">\n<parameter name=\"host\" value=\"`$vnf-host-ip-address`\"/>\n<parameter name=\"loginId\" value=\"`$device-authentication.USER-NAME`\"/>\n<parameter name=\"password\" value=\"`$device-authentication.PASSWORD`\"/>\n<parameter name=\"fullPathFileName\" value=\"`$configfilereference-log.TARGET-FILE-PATH`\"/>\n\n","comments":"","outputs":1,"x":1065.6666259765625,"y":578,"z":"fcbb9888.37da88","wires":[["f57ae80d.b71178","d8f1078c.618768"]]},{"id":"f57ae80d.b71178","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1366.6666259765625,"y":533,"z":"fcbb9888.37da88","wires":[["13117340.32ae0d"]]},{"id":"215ca65e.28efea","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":641.6666259765625,"y":910,"z":"fcbb9888.37da88","wires":[["bc8232f9.8eda9"]]},{"id":"c6e699ae.8aa998","type":"comment","name":"No Success or Failure found","info":"","comments":"","x":298.1666259765625,"y":775,"z":"fcbb9888.37da88","wires":[]},{"id":"9e84d5f0.0dfc98","type":"for","name":"for: check status 10 times","xml":"<for index=\"i\" start=\"0\" end=\"10\" >","comments":"","outputs":1,"x":428.6666259765625,"y":158,"z":"fcbb9888.37da88","wires":[["beea047c.66a218"]]},{"id":"1d7bf2cd.2246ad","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":198.6666259765625,"y":160,"z":"fcbb9888.37da88","wires":[["9e84d5f0.0dfc98"]]},{"id":"1e2c906.043db7","type":"switchNode","name":"switch: Max retries done?","xml":"<switch test=\"`$i`\">\n","comments":"","outputs":1,"x":1012.6666259765625,"y":903,"z":"fcbb9888.37da88","wires":[["e551d9.3207ee28","45310507.9bc52c"]]},{"id":"e551d9.3207ee28","type":"other","name":"outcome: 9","xml":"<outcome value='9'>\n","comments":"","outputs":1,"x":1264.6666259765625,"y":891,"z":"fcbb9888.37da88","wires":[["395a778a.a9c948"]]},{"id":"395a778a.a9c948","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1450.6666259765625,"y":885,"z":"fcbb9888.37da88","wires":[["3ad5063d.6732ea"]]},{"id":"bc8232f9.8eda9","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":805.6666259765625,"y":909,"z":"fcbb9888.37da88","wires":[["1e2c906.043db7"]]},{"id":"d7e4f931.ffe0d8","type":"comment","name":"Return Failure so that it exits immediately","info":"Error Code and message reflect the status\nReturning success doesnt exit the loop","comments":"","x":918.1666259765625,"y":227,"z":"fcbb9888.37da88","wires":[]},{"id":"3ad5063d.6732ea","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"Configuration Failed. No configuration success or error file found on the device\" />\n<parameter name=\"error-code\" value=\"401\" />\n\n","comments":"","x":1641.6666259765625,"y":882,"z":"fcbb9888.37da88","wires":[]},{"id":"498b7be.6025a84","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"RETRY ATTEMPT START\" value=\"`$i`\"/>\n","comments":"","outputs":1,"x":376.6666259765625,"y":225,"z":"fcbb9888.37da88","wires":[[]]},{"id":"45310507.9bc52c","type":"other","name":"outcome: Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1262.6666259765625,"y":969,"z":"fcbb9888.37da88","wires":[["9504b9a.138f348"]]},{"id":"9504b9a.138f348","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1445.6666259765625,"y":967,"z":"fcbb9888.37da88","wires":[["dc1f4ff5.d695c"]]},{"id":"dc1f4ff5.d695c","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"RETRYATTEMPT DONE\"/>\n<parameter name=\"field3\" value=\"`$i`\"/>\n\n\n\n","comments":"","outputs":1,"x":1622.6666259765625,"y":963,"z":"fcbb9888.37da88","wires":[[]]},{"id":"44876ee3.fc9e2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":547.9999313354492,"y":366.66668224334717,"z":"fcbb9888.37da88","wires":[["5067f82d.014248"]]},{"id":"5067f82d.014248","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":715.9999313354492,"y":370.66668224334717,"z":"fcbb9888.37da88","wires":[["13159be6.000524"]]},{"id":"13159be6.000524","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"Unable to call SftpAdaptor\" />\n<parameter name=\"error-code\" value=\"401\" />\n ","comments":"","x":894.9999313354492,"y":376.66668224334717,"z":"fcbb9888.37da88","wires":[]},{"id":"54a1451e.6ee1bc","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":651.6666259765625,"y":732,"z":"fcbb9888.37da88","wires":[["4093e936.3c4fd8"]]},{"id":"4093e936.3c4fd8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":851.6666259765625,"y":728,"z":"fcbb9888.37da88","wires":[["5f93d2f8.23ba5c"]]},{"id":"5f93d2f8.23ba5c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"Configuration request Failed. Unable to get Failure Log\" />\n<parameter name=\"error-code\" value=\"401\" />","comments":"","x":1078.6666259765625,"y":729,"z":"fcbb9888.37da88","wires":[]},{"id":"d8f1078c.618768","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1365.6666259765625,"y":605,"z":"fcbb9888.37da88","wires":[["4093e936.3c4fd8"]]},{"id":"9bcbe24b.484ad","type":"comment","name":"Set Success Code","info":"","comments":"","x":1088.6666259765625,"y":278,"z":"fcbb9888.37da88","wires":[]},{"id":"aa91d71.164a828","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":704.6666259765625,"y":274,"z":"fcbb9888.37da88","wires":[["f1c9a647.703908"]]},{"id":"42eefa18.fd8294","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-message\" value=\"SUCCESS - request has been processed successfully\" />\n<parameter name=\"error-code\" value=\"400\" />\n","comments":"","x":905.3333358764648,"y":277.6667184829712,"z":"fcbb9888.37da88","wires":[]},{"id":"13117340.32ae0d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1556.6666259765625,"y":531,"z":"fcbb9888.37da88","wires":[["f54b4753.162b58"]]},{"id":"f54b4753.162b58","type":"execute","name":"execute ParseErrorLog","xml":"<execute plugin=\"org.openecomp.sdnc.config.generator.pattern.PatternNode\" method=\"parseErrorLog\">\n<parameter name=\"logData\" value=\"`$fileContents`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.patternNode\" />","comments":"","outputs":1,"x":1801.3332748413086,"y":532.9999961853027,"z":"fcbb9888.37da88","wires":[["ffed95c2.8361f8","10080deb.35a4d2","8dbc2d9f.45dd7"]]},{"id":"ffed95c2.8361f8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2040.6666259765625,"y":504,"z":"fcbb9888.37da88","wires":[["64039324.913e5c"]]},{"id":"10080deb.35a4d2","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2045.6666259765625,"y":565,"z":"fcbb9888.37da88","wires":[["b56b07c0.65d7e8"]]},{"id":"64039324.913e5c","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2201.6666259765625,"y":505,"z":"fcbb9888.37da88","wires":[["54c6aeea.1f039"]]},{"id":"b56b07c0.65d7e8","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2197.6666259765625,"y":568,"z":"fcbb9888.37da88","wires":[["9836fa6f.ef13b8"]]},{"id":"9836fa6f.ef13b8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"Configuration has failed.Unable to process error log\"/>\n\t","comments":"","x":2379.6666259765625,"y":569,"z":"fcbb9888.37da88","wires":[]},{"id":"54c6aeea.1f039","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`$tmp.patternNode.error-message`\"/>\n\t\n\t","comments":"","x":2399.6666259765625,"y":506,"z":"fcbb9888.37da88","wires":[]},{"id":"8dbc2d9f.45dd7","type":"not-found","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2024.6666259765625,"y":633,"z":"fcbb9888.37da88","wires":[["c39b08ed.61c138"]]},{"id":"c39b08ed.61c138","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2180.6666259765625,"y":635,"z":"fcbb9888.37da88","wires":[["e69fed9f.542e7"]]},{"id":"e69fed9f.542e7","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`'Configuration has failed.' + $tmp.patternNode.parsedError`\"/>\n\t","comments":"","x":2352.6666259765625,"y":633,"z":"fcbb9888.37da88","wires":[]},{"id":"f1c9a647.703908","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"error-message\" value=\"SUCCESS - request has been processed successfully\" />\n<parameter name=\"error-code\" value=\"400\" />\n\n","comments":"","x":895.333251953125,"y":319.99999141693115,"z":"fcbb9888.37da88","wires":[]}] \ No newline at end of file
diff --git a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_DGOrchestrator.json b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_DGOrchestrator.json
index 61edf02ca..82db2b972 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_DGOrchestrator.json
+++ b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_DGOrchestrator.json
@@ -18,4 +18,4 @@
* ============LICENSE_END=========================================================
*/
-[{"id":"be33b5c6.f20c28","type":"dgstart","name":"DGSTART","outputs":1,"x":124.75,"y":93.75,"z":"fd9000dc.f5d3d","wires":[["4c6cd768.a6e2c8"]]},{"id":"4c6cd768.a6e2c8","type":"service-logic","name":"APPC 4.0.0","module":"APPC","version":"4.0.0","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='4.0.0'>","outputs":1,"x":310.178560256958,"y":90.25,"z":"fd9000dc.f5d3d","wires":[["f4d82a0c.2e0258"]]},{"id":"f4d82a0c.2e0258","type":"method","name":"method DGOrchestrator","xml":"<method rpc='DGOrchestrator' mode='sync'>\n","comments":"","outputs":1,"x":514.7262020111084,"y":79.75,"z":"fd9000dc.f5d3d","wires":[["dc30f869.1cf2f"]]},{"id":"dc30f869.1cf2f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":120.99207878112793,"y":213.45237159729004,"z":"fd9000dc.f5d3d","wires":[["f82fb637.510eb","3c192762.75985","509cd757.36a6","e8368977.8442a8"]]},{"id":"e8368977.8442a8","type":"call","name":"call: setInputParams","xml":"<call module=\"APPC\" rpc=\"setInputParams\" mode=\"sync\">","comments":"","outputs":1,"x":554.4166851043701,"y":149.41666221618652,"z":"fd9000dc.f5d3d","wires":[["5a5e96b8.1ceb4","f5e748b.6b0a6b8","49a9602b.849108"]]},{"id":"212949d5.4ee156","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1240.166748046875,"y":366.1666564941406,"z":"fd9000dc.f5d3d","wires":[["7f30608a.f337e8"]]},{"id":"84df469f.3e0c2","type":"execute","name":"execute get and executeFlowSequence","xml":"<execute plugin=\"org.openecomp.appc.flow.controller.node.FlowControlNode\" method=\"processFlow\">\n<parameter name=\"messageType\" value=\"response\" />\n<parameter name=\"message\" value=\"`$tmp.message`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.flowControl\" />\n","comments":"","outputs":1,"x":985.6270751953125,"y":395.4801330566406,"z":"fd9000dc.f5d3d","wires":[["212949d5.4ee156","99d21d74.00ea68"]]},{"id":"7f30608a.f337e8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1409.547607421875,"y":368.6904602050781,"z":"fd9000dc.f5d3d","wires":[["a9f19613.ed1ca"]]},{"id":"caf8c957.f6dfd","type":"set","name":"set error-code 400 and message","xml":"<set>\n<parameter name='error-code' value='400' />\n<parameter name='error-message' value=\"SUCCESS - request has been processed successfully\" />\n<parameter name='output-payload' value=\"`'state : ' + $output.payload.state` \" />\n","comments":"","x":1650.023681640625,"y":431.9166259765625,"z":"fd9000dc.f5d3d","wires":[]},{"id":"99d21d74.00ea68","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1237.71435546875,"y":419.1666259765625,"z":"fd9000dc.f5d3d","wires":[["629d72f.45afc0c"]]},{"id":"629d72f.45afc0c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1415.59521484375,"y":422.15472412109375,"z":"fd9000dc.f5d3d","wires":[["caf8c957.f6dfd"]]},{"id":"a9f19613.ed1ca","type":"set","name":"set error-code 401 and message","xml":"<set>\n<parameter name='error-code' value='401' />\n<parameter name='error-message' value=\"`$tmp.flowControl.status-message`\" />\n<parameter name='output-payload' value=\"\" />\n","comments":"","x":1654.8333740234375,"y":365.2975769042969,"z":"fd9000dc.f5d3d","wires":[]},{"id":"3c192762.75985","type":"execute","name":"execute saveTxLog","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"saveConfigTransactionLog\">\n<parameter name=\"messageType\" value=\"response\" />\n<parameter name=\"message\" value=\"`$tmp.message`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.saveTxLog\" />\n","comments":"","outputs":1,"x":428.6666316986084,"y":769.6389026641846,"z":"fd9000dc.f5d3d","wires":[["8bbc0ff6.7dc998"]]},{"id":"8bbc0ff6.7dc998","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":666.7777156829834,"y":770.5555286407471,"z":"fd9000dc.f5d3d","wires":[["813ebbd4.36c0b"]]},{"id":"813ebbd4.36c0b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":892.2500133514404,"y":772.1388416290283,"z":"fd9000dc.f5d3d","wires":[[]]},{"id":"f82fb637.510eb","type":"set","name":"set tmp.message","xml":"<set>\n<parameter name=\"tmp.message\" value=\"`$error-code + ':' + $error-message`\"/>\n","comments":"","x":449.1110897064209,"y":663.4999809265137,"z":"fd9000dc.f5d3d","wires":[]},{"id":"5a5e96b8.1ceb4","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":867.2500133514404,"y":98.91666316986084,"z":"fd9000dc.f5d3d","wires":[["1979616f.c95eb7"]]},{"id":"f5e748b.6b0a6b8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":864.7500133514404,"y":170.91666412353516,"z":"fd9000dc.f5d3d","wires":[["1979616f.c95eb7"]]},{"id":"1979616f.c95eb7","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n\n","atomic":"true","comments":"","outputs":1,"x":1611.5,"y":95.41668701171875,"z":"fd9000dc.f5d3d","wires":[[]]},{"id":"509cd757.36a6","type":"switchNode","name":"switch error-code","xml":"<switch test='`$error-code`'>\n","comments":"","outputs":1,"x":477.2500057220459,"y":485.16666984558105,"z":"fd9000dc.f5d3d","wires":[["7db7a99f.54a8a8","81563318.4c1248"]]},{"id":"7db7a99f.54a8a8","type":"success","name":"outcome: 400","xml":"<outcome value=\"400\">","comments":"","outputs":1,"x":725.2500095367432,"y":464.16666984558105,"z":"fd9000dc.f5d3d","wires":[["33eae567.c4ef32"]]},{"id":"81563318.4c1248","type":"success","name":"outcome: Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":723.5000095367432,"y":579.1666717529297,"z":"fd9000dc.f5d3d","wires":[["3ca59ecb.d0901a"]]},{"id":"33eae567.c4ef32","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":976.5000133514404,"y":465.16666984558105,"z":"fd9000dc.f5d3d","wires":[["cceb70bd.448bf8"]]},{"id":"3ca59ecb.d0901a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":988.5000114440918,"y":585.4166717529297,"z":"fd9000dc.f5d3d","wires":[["52806fa.179521"]]},{"id":"cceb70bd.448bf8","type":"set","name":"set Status for dispatcher","xml":"<set>\n<parameter name='SvcLogic.status' value='success' />\n<parameter name='output.status.code' value='`$error-code`' />\n<parameter name='output.status.message' value='`$error-message`' />","comments":"","x":1259.5000133514404,"y":466.66666984558105,"z":"fd9000dc.f5d3d","wires":[]},{"id":"52806fa.179521","type":"set","name":"set Status for dispatcher","xml":"<set>\n<parameter name='SvcLogic.status' value='failure' />\n<parameter name='output.status.code' value='`$error-code`' />\n<parameter name='output.status.message' value='`$error-message`' />\n","comments":"","x":1264.000020980835,"y":587.6666707992554,"z":"fd9000dc.f5d3d","wires":[]},{"id":"d2e5bf05.25d308","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":536.0000057220459,"y":226.41666507720947,"z":"fd9000dc.f5d3d","wires":[["8a4dbd4d.32aca","8b68a368.08cbd","15f6ca12.22ba66"]]},{"id":"49a9602b.849108","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":337.25000762939453,"y":231.41666507720947,"z":"fd9000dc.f5d3d","wires":[["d2e5bf05.25d308"]]},{"id":"8a4dbd4d.32aca","type":"execute","name":"execute getCapability","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"getCapability\">\n<parameter name=\"caplevel\" value=\"`$action-level`\" />\n<parameter name=\"checkCapability\" value=\"`$request-action`\" />\n<parameter name=\"vnf-type\" value=\"`$vnf-type`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.flowControl\" />\n","comments":"","outputs":1,"x":651.75,"y":290.5,"z":"fd9000dc.f5d3d","wires":[["10a69307.3351b5","1addf78a.9378c"]]},{"id":"64d092ba.1e7874","type":"switchNode","name":"switch capability-result","xml":"<switch test='`$capability-result`'>\n","comments":"","outputs":1,"x":1045.75,"y":229.5,"z":"fd9000dc.f5d3d","wires":[["dca0e548.50fd4","d41c1ff3.69d1","f7b42900.0c913"]]},{"id":"dca0e548.50fd4","type":"success","name":"outcome: Not-Supported","xml":"<outcome value=\"Not-Supported\">","comments":"","outputs":1,"x":1286.75,"y":170.5,"z":"fd9000dc.f5d3d","wires":[["b13dd342.2c93e8"]]},{"id":"d41c1ff3.69d1","type":"success","name":"outcome: Supported","xml":"<outcome value=\"Supported\">","comments":"","outputs":1,"x":1275,"y":216.5,"z":"fd9000dc.f5d3d","wires":[["1961eaae.696d8d"]]},{"id":"1addf78a.9378c","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":842.75,"y":272.5,"z":"fd9000dc.f5d3d","wires":[["85d37b3.5760408"]]},{"id":"10a69307.3351b5","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":853.2976684570312,"y":230.49996948242188,"z":"fd9000dc.f5d3d","wires":[["64d092ba.1e7874"]]},{"id":"b13dd342.2c93e8","type":"set","name":"set error-code 450 and message","xml":"<set>\n<parameter name='error-code' value='450' />\n<parameter name='error-message' value=\"Request not supported\" />\n<parameter name='output-payload' value=\"\" />","comments":"","x":1551.75,"y":170.5,"z":"fd9000dc.f5d3d","wires":[]},{"id":"1961eaae.696d8d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1773.75,"y":240.5,"z":"fd9000dc.f5d3d","wires":[["84df469f.3e0c2"]]},{"id":"8b68a368.08cbd","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"` 'Capabilities results will be - '+$capability-result`\" />","comments":"","outputs":1,"x":692.75,"y":241.5,"z":"fd9000dc.f5d3d","wires":[[]]},{"id":"15f6ca12.22ba66","type":"set","name":"set capability-result","xml":"<set>\n<parameter name='capability-result' value=\"`'tmp.flowControl.capabilities.'+ $action-level + '.' + $request-action`\"/>\n","comments":"","x":723.75,"y":194.5,"z":"fd9000dc.f5d3d","wires":[]},{"id":"f7b42900.0c913","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1247.75,"y":252.5,"z":"fd9000dc.f5d3d","wires":[["85d37b3.5760408"]]},{"id":"e93f7684.b28d88","type":"set","name":"set error code 401","xml":"<set>\n<parameter name='error-code' value='401' />\n<parameter name='error-message' value=\"Error getting capabilities information\" />\n<parameter name='output-payload' value=\"\" />\n","comments":"","x":1489.75,"y":275.75,"z":"fd9000dc.f5d3d","wires":[]},{"id":"85d37b3.5760408","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n\n","atomic":"true","comments":"","outputs":1,"x":1275.75,"y":299.75,"z":"fd9000dc.f5d3d","wires":[["e93f7684.b28d88"]]}]
+[{"id":"cc7613cc.95794","type":"dgstart","name":"DGSTART","outputs":1,"x":120,"y":35,"z":"b5c78a68.c719b8","wires":[["2d4b90af.faf41"]]},{"id":"2d4b90af.faf41","type":"service-logic","name":"APPC 4.0.0","module":"APPC","version":"4.0.0","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='4.0.0'>","outputs":1,"x":277.34282302856445,"y":34.98572540283203,"z":"b5c78a68.c719b8","wires":[["8304fc44.9ebbb"]]},{"id":"8304fc44.9ebbb","type":"method","name":"method DGOrchestrator","xml":"<method rpc='DGOrchestrator' mode='sync'>\n","comments":"","outputs":1,"x":481.89046478271484,"y":24.48572540283203,"z":"b5c78a68.c719b8","wires":[["acf3ff69.b8c6d"]]},{"id":"acf3ff69.b8c6d","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":88.15634155273438,"y":158.18809700012207,"z":"b5c78a68.c719b8","wires":[["45701fe7.e3742","5723a974.ebf848","a5458042.bca07","f8f31869.052208"]]},{"id":"f8f31869.052208","type":"call","name":"call: setInputParams","xml":"<call module=\"APPC\" rpc=\"setInputParams\" mode=\"sync\">","comments":"","outputs":1,"x":622.9142913818359,"y":74.48572635650635,"z":"b5c78a68.c719b8","wires":[["622ca56a.3fad0c","659a6371.afedbc","62b5aa24.e512d4"]]},{"id":"cd3540fd.5c901","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2115.6643924713135,"y":185.90237140655518,"z":"b5c78a68.c719b8","wires":[["c93880dc.83f6b"]]},{"id":"2cfe388d.c4a318","type":"execute","name":"execute get and executeFlowSequence","xml":"<execute plugin=\"org.openecomp.appc.flow.controller.node.FlowControlNode\" method=\"processFlow\">\n<parameter name=\"messageType\" value=\"response\" />\n<parameter name=\"message\" value=\"`$tmp.message`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.flowControl\" />\n","comments":"","outputs":1,"x":1823.7911643981934,"y":198.21586418151855,"z":"b5c78a68.c719b8","wires":[["cd3540fd.5c901","a73b7dad.5f10d"]]},{"id":"c93880dc.83f6b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2326.711868286133,"y":183.4261817932129,"z":"b5c78a68.c719b8","wires":[["90e79699.33c448"]]},{"id":"ce8b3cd9.aa5d5","type":"set","name":"set error-code 400 and message","xml":"<set>\n<parameter name='error-code' value='400' />\n<parameter name='error-message' value=\"SUCCESS - request has been processed successfully\" />\n<parameter name='output-payload' value=\"`'state : ' + $output.payload.state` \" />\n","comments":"","x":2572.1879119873047,"y":264.985652923584,"z":"b5c78a68.c719b8","wires":[]},{"id":"a73b7dad.5f10d","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":2121.5452003479004,"y":265.56900215148926,"z":"b5c78a68.c719b8","wires":[["7c4a5d10.2ce964"]]},{"id":"7c4a5d10.2ce964","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":2309.425952911377,"y":265.2237958908081,"z":"b5c78a68.c719b8","wires":[["ce8b3cd9.aa5d5"]]},{"id":"90e79699.33c448","type":"set","name":"set error-code 401 and message","xml":"<set>\n<parameter name='error-code' value='401' />\n<parameter name='error-message' value=\"`$tmp.flowControl.status-message`\" />\n<parameter name='output-payload' value=\"\" />\n","comments":"","x":2576.9976806640625,"y":183.36661529541016,"z":"b5c78a68.c719b8","wires":[]},{"id":"5723a974.ebf848","type":"execute","name":"execute saveTxLog","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"saveConfigTransactionLog\">\n<parameter name=\"messageType\" value=\"response\" />\n<parameter name=\"message\" value=\"`$tmp.message`\" />\n<parameter name=\"responsePrefix\" value=\"tmp.saveTxLog\" />\n","comments":"","outputs":1,"x":287.4975776672363,"y":876.0412883758545,"z":"b5c78a68.c719b8","wires":[["5a16feb3.2142b"]]},{"id":"5a16feb3.2142b","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":488.9419479370117,"y":876.957914352417,"z":"b5c78a68.c719b8","wires":[["9973dad4.c4f6c8"]]},{"id":"9973dad4.c4f6c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":664.4143218994141,"y":878.5412473678589,"z":"b5c78a68.c719b8","wires":[[]]},{"id":"45701fe7.e3742","type":"set","name":"set tmp.message","xml":"<set>\n<parameter name=\"tmp.message\" value=\"`$error-code + ':' + $error-message`\"/>\n","comments":"","x":306.2753677368164,"y":788.2357015609741,"z":"b5c78a68.c719b8","wires":[]},{"id":"622ca56a.3fad0c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":838.414306640625,"y":33.652387619018555,"z":"b5c78a68.c719b8","wires":[["6a0a4cab.d6ed74"]]},{"id":"659a6371.afedbc","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":832.914306640625,"y":72.65238952636719,"z":"b5c78a68.c719b8","wires":[["6a0a4cab.d6ed74"]]},{"id":"6a0a4cab.d6ed74","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n\n","atomic":"true","comments":"","outputs":1,"x":1005.664306640625,"y":54.15241241455078,"z":"b5c78a68.c719b8","wires":[[]]},{"id":"a5458042.bca07","type":"switchNode","name":"switch error-code","xml":"<switch test='`$error-code`'>\n","comments":"","outputs":1,"x":311.0809631347656,"y":729.9024333953857,"z":"b5c78a68.c719b8","wires":[["3369bc31.864784","db62a292.a4939"]]},{"id":"3369bc31.864784","type":"success","name":"outcome: 400","xml":"<outcome value=\"400\">","comments":"","outputs":1,"x":575.7475891113281,"y":682.2357139587402,"z":"b5c78a68.c719b8","wires":[["84d8c9bc.503a98"]]},{"id":"db62a292.a4939","type":"success","name":"outcome: Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":575.664249420166,"y":782.235746383667,"z":"b5c78a68.c719b8","wires":[["149ad4e8.284b8b"]]},{"id":"84d8c9bc.503a98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":786.9976348876953,"y":684.9024209976196,"z":"b5c78a68.c719b8","wires":[["373e530e.18cd9c"]]},{"id":"149ad4e8.284b8b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":768.9974899291992,"y":783.485746383667,"z":"b5c78a68.c719b8","wires":[["2e5fbdd7.64def2"]]},{"id":"373e530e.18cd9c","type":"set","name":"set Status for dispatcher","xml":"<set>\n<parameter name='SvcLogic.status' value='success' />\n<parameter name='output.status.code' value='`$error-code`' />\n<parameter name='output.status.message' value='`$error-message`' />","comments":"","x":1036.6643371582031,"y":683.0690479278564,"z":"b5c78a68.c719b8","wires":[]},{"id":"2e5fbdd7.64def2","type":"set","name":"set Status for dispatcher","xml":"<set>\n<parameter name='SvcLogic.status' value='failure' />\n<parameter name='output.status.code' value='`$error-code`' />\n<parameter name='output.status.message' value='`$error-message`' />\n","comments":"","x":1006.1642837524414,"y":782.4023923873901,"z":"b5c78a68.c719b8","wires":[]},{"id":"5ffe82f1.ced74c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":499.16426849365234,"y":185.81904411315918,"z":"b5c78a68.c719b8","wires":[["f2a3b57e.020398"]]},{"id":"62b5aa24.e512d4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":828.747615814209,"y":112.48571968078613,"z":"b5c78a68.c719b8","wires":[["5ffe82f1.ced74c"]]},{"id":"b1cea122.15118","type":"execute","name":"execute getCapability","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"getCapability\">\n<parameter name=\"caplevel\" value=\"`$action-level`\" />\n<parameter name=\"checkCapability\" value=\"`$request-action`\" />\n<parameter name=\"vnf-type\" value=\"`$vnf-type`\" />\n\n","comments":"","outputs":1,"x":804.9144706726074,"y":333.9023542404175,"z":"b5c78a68.c719b8","wires":[["d22ba9c1.a51338","eb81f91.6a55e08"]]},{"id":"1fadfea8.b95051","type":"switchNode","name":"switch capability-result","xml":"<switch test=\"`$capabilities`\">\n","comments":"","outputs":1,"x":1134.704574584961,"y":419.6452317237854,"z":"b5c78a68.c719b8","wires":[["e9a40f9e.0d95c","9e5a076a.69f2e8","439b34b1.4501ac"]]},{"id":"e9a40f9e.0d95c","type":"success","name":"outcome: Not-Supported","xml":"<outcome value=\"Not-Supported\">","comments":"","outputs":1,"x":1373.9144439697266,"y":546.2356586456299,"z":"b5c78a68.c719b8","wires":[["a8ce8939.428ce8"]]},{"id":"9e5a076a.69f2e8","type":"success","name":"outcome: Supported","xml":"<outcome value=\"Supported\">","comments":"","outputs":1,"x":1364.8310241699219,"y":478.56904220581055,"z":"b5c78a68.c719b8","wires":[["c0c9441c.47acf8"]]},{"id":"d22ba9c1.a51338","type":"failure","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1106.0094909667969,"y":280.0928611755371,"z":"b5c78a68.c719b8","wires":[["bf213715.b3a6c8"]]},{"id":"eb81f91.6a55e08","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1090.4619979858398,"y":336.90238761901855,"z":"b5c78a68.c719b8","wires":[["a3035540.336198"]]},{"id":"a8ce8939.428ce8","type":"set","name":"set error-code 450 and message","xml":"<set>\n<parameter name='error-code' value='450' />\n<parameter name='error-message' value=\"Request not supported\" />\n<parameter name='output-payload' value=\"\" />","comments":"","x":1664.247543334961,"y":547.9023866653442,"z":"b5c78a68.c719b8","wires":[]},{"id":"c0c9441c.47acf8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":"","outputs":1,"x":1586.2476196289062,"y":482.56903076171875,"z":"b5c78a68.c719b8","wires":[["2cfe388d.c4a318"]]},{"id":"439b34b1.4501ac","type":"other","name":"Other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1311.5810661315918,"y":408.23571491241455,"z":"b5c78a68.c719b8","wires":[["bf213715.b3a6c8"]]},{"id":"7bfc9412.60aa0c","type":"set","name":"set error code 401","xml":"<set>\n<parameter name='error-code' value='401' />\n<parameter name='error-message' value=\"Cannot Determine Capabilities\" />\n<parameter name='output-payload' value=\"\" />\n","comments":"","x":1544.9141693115234,"y":277.48572874069214,"z":"b5c78a68.c719b8","wires":[]},{"id":"a3035540.336198","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n\n","atomic":"true","comments":"","outputs":1,"x":935.2992706298828,"y":420.0594539642334,"z":"b5c78a68.c719b8","wires":[["1fadfea8.b95051"]]},{"id":"b32ad07d.3b548","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"field2\" value=\"` 'Capabilities results will be - '+$capabilities`\" />","comments":"","outputs":1,"x":1511.3230590820312,"y":337.7023859024048,"z":"b5c78a68.c719b8","wires":[[]]},{"id":"f2a3b57e.020398","type":"switchNode","name":"switch action-level","xml":"<switch test='`$action-level`'>\n","comments":"","outputs":1,"x":690.4444808959961,"y":186.66671562194824,"z":"b5c78a68.c719b8","wires":[["33069169.beb0fe","640470bf.d9539"]]},{"id":"33069169.beb0fe","type":"success","name":"outcome: Other","xml":"<outcome value='Other'>","comments":"","outputs":1,"x":587.8610458374023,"y":331.4166831970215,"z":"b5c78a68.c719b8","wires":[["b1cea122.15118"]]},{"id":"640470bf.d9539","type":"success","name":"outcome: vm","xml":"<outcome value='vm'>","comments":"","outputs":1,"x":886.1943511962891,"y":184.08336639404297,"z":"b5c78a68.c719b8","wires":[["b9c857ee.f64a08"]]},{"id":"bf213715.b3a6c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n\n","atomic":"true","comments":"","outputs":1,"x":1339.2476119995117,"y":282.15234565734863,"z":"b5c78a68.c719b8","wires":[["7bfc9412.60aa0c","b32ad07d.3b548"]]},{"id":"b9c857ee.f64a08","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">\n\n","atomic":"true","comments":"","outputs":1,"x":1101.6666717529297,"y":184.99999809265137,"z":"b5c78a68.c719b8","wires":[["2cfe388d.c4a318"]]}]
diff --git a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_MergeTemplateData.json b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_MergeTemplateData.json
index 1fae6b429..95beb1ac2 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_MergeTemplateData.json
+++ b/appc-directed-graph/appc-dgraph/provider/src/main/resources/json/APPC/APPC_MergeTemplateData.json
@@ -18,4 +18,4 @@
* ============LICENSE_END=========================================================
*/
-[{"id":"f8921e1c.58be9","type":"switchNode","name":"switch config-type","xml":"<switch test='`$config-type`'>\n","comments":"","outputs":1,"x":442.0833206176758,"y":504.04761695861816,"z":"f345a691.511928","wires":[["9d50b4aa.bba6e8","be5ddc7b.c1ad2"]]},{"id":"9d50b4aa.bba6e8","type":"success","name":"outcome: template","xml":"<outcome value=\"template\">","comments":"","outputs":1,"x":628.9881057739258,"y":419.0833225250244,"z":"f345a691.511928","wires":[["52e44ac2.00d0b4"]]},{"id":"4bce4330.9abe1c","type":"call","name":"call: GenerateTemplateConfig","xml":"<call module=\"APPC\" rpc=\"GenerateTemplateConfig\" mode=\"sync\">","comments":"","outputs":1,"x":1006.9048614501953,"y":555.5833225250244,"z":"f345a691.511928","wires":[["52878bb3.758a94","5a3fc9b0.328488"]]},{"id":"52878bb3.758a94","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1241.2380905151367,"y":628.7500057220459,"z":"f345a691.511928","wires":[["607a5532.aa9f4c"]]},{"id":"607a5532.aa9f4c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1464.9047584533691,"y":628.4166507720947,"z":"f345a691.511928","wires":[["d273087a.7aad98"]]},{"id":"d273087a.7aad98","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"'DG Workflow GenerateTemplateConfig not found'`\"/>\n\t","comments":"","x":1730.2380638122559,"y":625.4166297912598,"z":"f345a691.511928","wires":[]},{"id":"5a3fc9b0.328488","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1232.571418762207,"y":684.7500066757202,"z":"f345a691.511928","wires":[["808e59e7.0b2f18"]]},{"id":"808e59e7.0b2f18","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1447.5715026855469,"y":682.7499866485596,"z":"f345a691.511928","wires":[["768ae761.99be28"]]},{"id":"768ae761.99be28","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t\n\t","comments":"","x":1715.9047622680664,"y":684.4166326522827,"z":"f345a691.511928","wires":[]},{"id":"65721526.2ac06c","type":"comment","name":"templatename cases","info":"","comments":"","x":625.6548004150391,"y":381.16666412353516,"z":"f345a691.511928","wires":[]},{"id":"3fb4efa9.74098","type":"comment","name":"merge ASDC template and data","info":"","comments":"","x":993.1548004150391,"y":692.2500038146973,"z":"f345a691.511928","wires":[]},{"id":"38970141.b1febe","type":"comment","name":"configBlock with or without parameters","info":"","comments":"","x":641.4047546386719,"y":701.0833129882812,"z":"f345a691.511928","wires":[]},{"id":"52e44ac2.00d0b4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":838.0714836120605,"y":416.7499475479126,"z":"f345a691.511928","wires":[["4bce4330.9abe1c","5334d0f2.038dc"]]},{"id":"5334d0f2.038dc","type":"execute","name":"execute getTemplate","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"getTemplate\">\n<parameter name=\"fileCategory\" value=\"config_template\" />\n<parameter name=\"responsePrefix\" value=\"config-template\" />","comments":"","outputs":1,"x":1029.2381134033203,"y":400.0833206176758,"z":"f345a691.511928","wires":[["14f12426.28387c","14aca030.0e42b"]]},{"id":"14f12426.28387c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1235.4047508239746,"y":554.7499599456787,"z":"f345a691.511928","wires":[["cee4ac15.a8674"]]},{"id":"cee4ac15.a8674","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1479.4047546386719,"y":552.7499809265137,"z":"f345a691.511928","wires":[["ca88c01e.42141"]]},{"id":"ca88c01e.42141","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`$config-template.error-message`\"/>\n\t\n\t\n\t","comments":"","x":1727.4048080444336,"y":556.7499618530273,"z":"f345a691.511928","wires":[]},{"id":"14aca030.0e42b","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1233.0714988708496,"y":486.4166555404663,"z":"f345a691.511928","wires":[["9a175fa3.6cf5c"]]},{"id":"9a175fa3.6cf5c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1477.4047546386719,"y":486.7499885559082,"z":"f345a691.511928","wires":[["9ae65e20.973be"]]},{"id":"9ae65e20.973be","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"Unable to get template info\"/>\n\t\n\t\n\t","comments":"","x":1712.4048919677734,"y":485.74997901916504,"z":"f345a691.511928","wires":[]},{"id":"be5ddc7b.c1ad2","type":"success","name":"outcome: Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":572.6547622680664,"y":743.833324432373,"z":"f345a691.511928","wires":[["e4895786.a34328"]]},{"id":"e4895786.a34328","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":747.4047546386719,"y":743.0833129882812,"z":"f345a691.511928","wires":[["18151a68.7f7ee6"]]},{"id":"18151a68.7f7ee6","type":"call","name":"call: GenerateConfig","xml":"<call module=\"APPC\" rpc=\"GenerateConfig\" mode=\"sync\">","comments":"","outputs":1,"x":969.4047546386719,"y":746.0833129882812,"z":"f345a691.511928","wires":[["c0963b5e.dd87c8","ab05f1b3.bdac5"]]},{"id":"c0963b5e.dd87c8","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1165.4047546386719,"y":740.0833129882812,"z":"f345a691.511928","wires":[["a8a5b7f4.67b348"]]},{"id":"a8a5b7f4.67b348","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1337.4047546386719,"y":742.0833129882812,"z":"f345a691.511928","wires":[["744f44d3.fcdc9c"]]},{"id":"744f44d3.fcdc9c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"'DG Workflow GenerateConfig not found'`\"/>\n\t","comments":"","x":1518.4047546386719,"y":744.0833129882812,"z":"f345a691.511928","wires":[]},{"id":"ab05f1b3.bdac5","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1153.4047546386719,"y":802.0833129882812,"z":"f345a691.511928","wires":[["373b75fa.44f95a"]]},{"id":"373b75fa.44f95a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1324.4047546386719,"y":805.0833129882812,"z":"f345a691.511928","wires":[["f779061c.295e18"]]},{"id":"f779061c.295e18","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t\n\t","comments":"","x":1519.4047546386719,"y":807.0833129882812,"z":"f345a691.511928","wires":[]},{"id":"4b8122dc.6a8c3c","type":"dgstart","name":"DGSTART","outputs":1,"x":200.3492088317871,"y":101.55554485321045,"z":"f345a691.511928","wires":[["28792224.cbdf1e"]]},{"id":"28792224.cbdf1e","type":"service-logic","name":"APPC 4.0.0","module":"APPC","version":"4.0.0","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='4.0.0'>","outputs":1,"x":433.46030044555664,"y":102.77776527404785,"z":"f345a691.511928","wires":[["4e973aa1.9126c4"]]},{"id":"4e973aa1.9126c4","type":"method","name":"method MergeTemplateData","xml":"<method rpc='MergeTemplateData' mode='sync'>\n","comments":"","outputs":1,"x":655.5436477661133,"y":101.74998569488525,"z":"f345a691.511928","wires":[["8d193752.62f9c8"]]},{"id":"8d193752.62f9c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":212.15476989746094,"y":248.5000081062317,"z":"f345a691.511928","wires":[["f8921e1c.58be9","fd6f20ad.09867","7526d1f3.61a4b","df45238c.529a5","19785350.3a3fdd"]]},{"id":"fd6f20ad.09867","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"CONFIGPARAMS\" value=\"`$config-data`\"/>\n<parameter name=\"CONFIGPARAMS1\" value=\"`$block_configuration-parameters`\"/>\n<parameter name=\"TEMPLATENAME\" value=\"`$template-name`\"/>\n<parameter name=\"CONFIGURATION\" value=\"`$configuration`\"/>\n<parameter name=\"CONFIGURATION1\" value=\"`$block_configuration`\"/>\n\n","comments":"","outputs":1,"x":670.0318069458008,"y":225.32538414001465,"z":"f345a691.511928","wires":[[]]},{"id":"7526d1f3.61a4b","type":"call","name":"call: ProcessParameterDefinition","xml":"<call module=\"APPC\" rpc=\"ProcessParameterDefinition\" mode=\"sync\">","comments":"","outputs":1,"x":692.6985015869141,"y":317.8531551361084,"z":"f345a691.511928","wires":[["432ecea.816133","d597c49.617f638"]]},{"id":"432ecea.816133","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1167.7262115478516,"y":269.0476131439209,"z":"f345a691.511928","wires":[["6c5a4256.68696c"]]},{"id":"6c5a4256.68696c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1354.4762153625488,"y":272.0476121902466,"z":"f345a691.511928","wires":[["a070ac72.bb3ea"]]},{"id":"a070ac72.bb3ea","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"'DG Workflow ProcessParameterDefinition not found'`\"/>\n\t","comments":"","x":1549.226219177246,"y":272.7976131439209,"z":"f345a691.511928","wires":[]},{"id":"d597c49.617f638","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1161.7262115478516,"y":351.0476140975952,"z":"f345a691.511928","wires":[["9fa5af5f.7dee5"]]},{"id":"9fa5af5f.7dee5","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1359.7262153625488,"y":367.5476140975952,"z":"f345a691.511928","wires":[["613f0962.3cde88"]]},{"id":"613f0962.3cde88","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t\n\t","comments":"","x":1558.476219177246,"y":365.0476131439209,"z":"f345a691.511928","wires":[]},{"id":"df45238c.529a5","type":"execute","name":"execute saveTxLog","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"saveConfigTransactionLog\">\n<parameter name=\"messageType\" value=\"log\" />\n<parameter name=\"message\" value=\"Prepare Success\" />\n<parameter name=\"responsePrefix\" value=\"tmp.saveTxLog\" />\n","comments":"","outputs":1,"x":448.33329010009766,"y":894.9999332427979,"z":"f345a691.511928","wires":[["934a9413.e3a788"]]},{"id":"934a9413.e3a788","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":677.9999847412109,"y":900.3332691192627,"z":"f345a691.511928","wires":[["14ed0dbd.988a62"]]},{"id":"14ed0dbd.988a62","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":967.3333282470703,"y":929.3332691192627,"z":"f345a691.511928","wires":[[]]},{"id":"19785350.3a3fdd","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"CONFIGPARAMS\" value=\"`$config-data`\"/>\n","comments":"","outputs":1,"x":349.9999809265137,"y":1111.6666269302368,"z":"f345a691.511928","wires":[[]]}]
+[{"id":"8ee93af3.e76758","type":"switchNode","name":"switch config-type","xml":"<switch test='`$config-type`'>\n","comments":"","outputs":1,"x":431.6666564941406,"y":315.8253974914551,"z":"a49375c8.88c748","wires":[["617b6511.320aec","d2208875.808258"]]},{"id":"617b6511.320aec","type":"success","name":"outcome: template","xml":"<outcome value=\"template\">","comments":"","outputs":1,"x":649.8214435577393,"y":317.1111030578613,"z":"a49375c8.88c748","wires":[["9708e2c6.a3ce4"]]},{"id":"6f91db3d.8b0924","type":"call","name":"call: GenerateTemplateConfig","xml":"<call module=\"APPC\" rpc=\"GenerateTemplateConfig\" mode=\"sync\">","comments":"","outputs":1,"x":1061.4881992340088,"y":447.36110496520996,"z":"a49375c8.88c748","wires":[["75d7daa7.8058a4","6a26f541.aa907c"]]},{"id":"75d7daa7.8058a4","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1292.0713901519775,"y":448.02779388427734,"z":"a49375c8.88c748","wires":[["314e0e4f.5adb22"]]},{"id":"314e0e4f.5adb22","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1464.488145828247,"y":447.6944193840027,"z":"a49375c8.88c748","wires":[["bdc01df2.1a5d8"]]},{"id":"bdc01df2.1a5d8","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"'DG Workflow GenerateTemplateConfig not found'`\"/>\n\t","comments":"","x":1658.5714015960693,"y":448.44441986083984,"z":"a49375c8.88c748","wires":[]},{"id":"6a26f541.aa907c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1292.1547679901123,"y":506.527792930603,"z":"a49375c8.88c748","wires":[["7ba894b.5d3a46c"]]},{"id":"7ba894b.5d3a46c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1467.154893875122,"y":507.027792930603,"z":"a49375c8.88c748","wires":[["9728b5f9.536268"]]},{"id":"9728b5f9.536268","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t\n\t","comments":"","x":1667.988145828247,"y":507.44441986083984,"z":"a49375c8.88c748","wires":[]},{"id":"7e6e5c1a.29c4a4","type":"comment","name":"templatename cases","info":"","comments":"","x":642.7381381988525,"y":370.4444465637207,"z":"a49375c8.88c748","wires":[]},{"id":"37b38554.dad0ca","type":"comment","name":"merge ASDC template and data","info":"","comments":"","x":968.9881381988525,"y":674.0277881622314,"z":"a49375c8.88c748","wires":[]},{"id":"63a29ad8.8e05e4","type":"comment","name":"configBlock with or without parameters","info":"","comments":"","x":620.9881076812744,"y":647.8611078262329,"z":"a49375c8.88c748","wires":[]},{"id":"9708e2c6.a3ce4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":843.904821395874,"y":318.5277290344238,"z":"a49375c8.88c748","wires":[["6f91db3d.8b0924","9ebb8ed8.eaa4e"]]},{"id":"9ebb8ed8.eaa4e","type":"execute","name":"execute getTemplate","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"getTemplate\">\n<parameter name=\"fileCategory\" value=\"config_template\" />\n<parameter name=\"responsePrefix\" value=\"config-template\" />","comments":"","outputs":1,"x":1048.8214511871338,"y":315.6111030578613,"z":"a49375c8.88c748","wires":[["367ba220.8bea8e","8c4d147f.36cf68"]]},{"id":"367ba220.8bea8e","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1232.4881420135498,"y":375.2777318954468,"z":"a49375c8.88c748","wires":[["9f013009.4fb92"]]},{"id":"9f013009.4fb92","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1415.238145828247,"y":369.527792930603,"z":"a49375c8.88c748","wires":[["e5aa2afa.241d48"]]},{"id":"e5aa2afa.241d48","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"`$config-template.error-message`\"/>\n\t\n\t\n\t","comments":"","x":1596.9881496429443,"y":368.52773094177246,"z":"a49375c8.88c748","wires":[]},{"id":"8c4d147f.36cf68","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1230.1548900604248,"y":285.69444847106934,"z":"a49375c8.88c748","wires":[["b643f5da.9fc9b8"]]},{"id":"b643f5da.9fc9b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1400.738145828247,"y":286.0277919769287,"z":"a49375c8.88c748","wires":[["7e56335c.a0b01c"]]},{"id":"7e56335c.a0b01c","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"Unable to get template info\"/>\n\t\n\t\n\t","comments":"","x":1595.7382717132568,"y":286.2777614593506,"z":"a49375c8.88c748","wires":[]},{"id":"d2208875.808258","type":"success","name":"outcome: Other","xml":"<outcome value=\"Other\">","comments":"","outputs":1,"x":613.4881000518799,"y":576.8611087799072,"z":"a49375c8.88c748","wires":[["a7aad416.c57578"]]},{"id":"a7aad416.c57578","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":803.238130569458,"y":584.8611087799072,"z":"a49375c8.88c748","wires":[["efd06d3f.ada62"]]},{"id":"efd06d3f.ada62","type":"call","name":"call: GenerateConfig","xml":"<call module=\"APPC\" rpc=\"GenerateConfig\" mode=\"sync\">","comments":"","outputs":1,"x":1017.7381381988525,"y":597.8611087799072,"z":"a49375c8.88c748","wires":[["af0cd93c.94b1b8","4352a232.eb3aec"]]},{"id":"af0cd93c.94b1b8","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1223.7381420135498,"y":596.8611068725586,"z":"a49375c8.88c748","wires":[["f4ef6668.6a1018"]]},{"id":"f4ef6668.6a1018","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1393.238145828247,"y":597.6111068725586,"z":"a49375c8.88c748","wires":[["39d87011.2d87b"]]},{"id":"39d87011.2d87b","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"'DG Workflow GenerateConfig not found'`\"/>\n\t","comments":"","x":1577.988145828247,"y":597.1111068725586,"z":"a49375c8.88c748","wires":[]},{"id":"4352a232.eb3aec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1216.7381381988525,"y":687.6111087799072,"z":"a49375c8.88c748","wires":[["37a5a6a1.b52c9a"]]},{"id":"37a5a6a1.b52c9a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1390.2381381988525,"y":681.8611087799072,"z":"a49375c8.88c748","wires":[["26d3fdda.ad1b12"]]},{"id":"26d3fdda.ad1b12","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t\n\t","comments":"","x":1575.238145828247,"y":680.1111097335815,"z":"a49375c8.88c748","wires":[]},{"id":"ff782964.e94288","type":"dgstart","name":"DGSTART","outputs":1,"x":176.1825466156006,"y":83.33332920074463,"z":"a49375c8.88c748","wires":[["eadfabd6.6161f8"]]},{"id":"eadfabd6.6161f8","type":"service-logic","name":"APPC 4.0.0","module":"APPC","version":"4.0.0","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='APPC' version='4.0.0'>","outputs":1,"x":409.2936382293701,"y":84.55554962158203,"z":"a49375c8.88c748","wires":[["7cd40519.3b23dc"]]},{"id":"7cd40519.3b23dc","type":"method","name":"method MergeTemplateData","xml":"<method rpc='MergeTemplateData' mode='sync'>\n","comments":"","outputs":1,"x":631.3769855499268,"y":83.52777004241943,"z":"a49375c8.88c748","wires":[["3fa03099.10f27"]]},{"id":"3fa03099.10f27","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":169.23812103271484,"y":270.27781772613525,"z":"a49375c8.88c748","wires":[["8ee93af3.e76758","6fc699a0.777a38","5514dd63.d31be4","f310f0a8.6039f","a2cedd5c.acad2"]]},{"id":"6fc699a0.777a38","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"CONFIGPARAMS\" value=\"`$config-data`\"/>\n<parameter name=\"CONFIGPARAMS1\" value=\"`$block_configuration-parameters`\"/>\n<parameter name=\"TEMPLATENAME\" value=\"`$template-name`\"/>\n<parameter name=\"CONFIGURATION\" value=\"`$configuration`\"/>\n<parameter name=\"CONFIGURATION1\" value=\"`$block_configuration`\"/>\n\n","comments":"","outputs":1,"x":834.1985054016113,"y":130.43650484085083,"z":"a49375c8.88c748","wires":[[]]},{"id":"a2cedd5c.acad2","type":"call","name":"call: ProcessParameterDefinition","xml":"<call module=\"APPC\" rpc=\"ProcessParameterDefinition\" mode=\"sync\">","comments":"","outputs":1,"x":788.5318756103516,"y":207.13093757629395,"z":"a49375c8.88c748","wires":[["66999aa1.1b0464","62eeaa57.a2b194"]]},{"id":"66999aa1.1b0464","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1153.5595512390137,"y":134.57539558410645,"z":"a49375c8.88c748","wires":[["65712e43.c571a"]]},{"id":"65712e43.c571a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1340.3095531463623,"y":132.5753936767578,"z":"a49375c8.88c748","wires":[["1eaf25d0.77480a"]]},{"id":"1eaf25d0.77480a","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t<parameter name=\"error-code\" value=\"401\"/>\n\t<parameter name=\"error-message\" value=\"'DG Workflow ProcessParameterDefinition not found'`\"/>\n\t","comments":"","x":1523.8095569610596,"y":132.07539558410645,"z":"a49375c8.88c748","wires":[]},{"id":"62eeaa57.a2b194","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1140.0595531463623,"y":191.57539653778076,"z":"a49375c8.88c748","wires":[["cba7e8ee.c38b88"]]},{"id":"cba7e8ee.c38b88","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":1324.3095531463623,"y":191.82539463043213,"z":"a49375c8.88c748","wires":[["f131fee9.6e3c4"]]},{"id":"5514dd63.d31be4","type":"execute","name":"execute saveTxLog","xml":"<execute plugin=\"org.openecomp.appc.data.services.node.ConfigResourceNode\" method=\"saveConfigTransactionLog\">\n<parameter name=\"messageType\" value=\"log\" />\n<parameter name=\"message\" value=\"Prepare Success\" />\n<parameter name=\"responsePrefix\" value=\"tmp.saveTxLog\" />\n","comments":"","outputs":1,"x":520.4166278839111,"y":803.0277366638184,"z":"a49375c8.88c748","wires":[["5d3a75fc.b01dec"]]},{"id":"5d3a75fc.b01dec","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":722.5833492279053,"y":817.1110496520996,"z":"a49375c8.88c748","wires":[["414c097b.0db3f8"]]},{"id":"414c097b.0db3f8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","comments":null,"outputs":1,"x":950.6666660308838,"y":814.8610496520996,"z":"a49375c8.88c748","wires":[[]]},{"id":"f310f0a8.6039f","type":"record","name":"record","xml":"<record plugin=\"org.openecomp.sdnc.sli.recording.Slf4jRecorder\">\n<parameter name=\"level\" value=\"info\"/>\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"__TIMESTAMP__\"/>\n<parameter name=\"CONFIGPARAMS\" value=\"`$config-data`\"/>\n","comments":"","outputs":1,"x":443.3333110809326,"y":920.9444265365601,"z":"a49375c8.88c748","wires":[[]]},{"id":"f131fee9.6e3c4","type":"returnFailure","name":"return failure","xml":"<return status=\"failure\">\n\t\n\t","comments":"","x":1514.7262878417969,"y":190.15872383117676,"z":"a49375c8.88c748","wires":[]}]
diff --git a/appc-inbound/appc-artifact-handler/features/src/main/resources/features.xml b/appc-inbound/appc-artifact-handler/features/src/main/resources/features.xml
index f742dfcb0..676049150 100644
--- a/appc-inbound/appc-artifact-handler/features/src/main/resources/features.xml
+++ b/appc-inbound/appc-artifact-handler/features/src/main/resources/features.xml
@@ -29,12 +29,12 @@
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
- <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
<feature name='app-cntrl-artifact-handler' description="Application Controller Artifact Handler"
version='${project.version}'>
<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
- <feature version="${broker-mdsal.version">odl-mdsal-broker</feature>
+ <feature version="${broker-mdsal.version}">odl-mdsal-broker</feature>
<feature version='${sdnctl.sli.version}'>sdnc-sli</feature>
<bundle>wrap:mvn:com.att.eelf/eelf-core/${eelf.version}</bundle>
<bundle>wrap:mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
diff --git a/appc-inbound/appc-design-services/features/src/main/resources/features.xml b/appc-inbound/appc-design-services/features/src/main/resources/features.xml
index d3cf5d20a..315becfdb 100644
--- a/appc-inbound/appc-design-services/features/src/main/resources/features.xml
+++ b/appc-inbound/appc-design-services/features/src/main/resources/features.xml
@@ -29,20 +29,20 @@
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
<repository>mvn:org.opendaylight.yangtools/features-yangtools/${odl.yangtools.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.controller/features-mdsal/${odl.controller.mdsal.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.netconf/features-restconf/${odl.controller.mdsal.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.controller/features-mdsal/${odl.controller.mdsal.features.version}/xml/features</repository>
+<!-- <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.netconf/features-restconf/${odl.controller.mdsal.version}/xml/features</repository> -->
- <feature name='appc-design-services' description="Application Controller LCM API Bypass"
+ <feature name='appc-design-services' description="Application Controller Design Services"
version='${project.version}'>
- <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
+ <feature version='${odl.mdsal.model.version}'>odl-mdsal-models</feature>
<bundle>mvn:org.openecomp.appc/appc-design-services-model/${project.version}</bundle>
<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
<feature version='${broker-mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${sdnctl.sli.version}'>sdnc-sli</feature>
- <bundle>mvn:org.openecomp.appc/appc-design-services.provider/${project.version}</bundle>
+ <bundle>mvn:org.openecomp.appc/appc-design-services-provider/${project.version}</bundle>
<bundle>wrap:mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.3.0</bundle>
<feature version='${broker-mdsal.version}'>odl-restconf</feature>
diff --git a/appc-outbound/appc-aai-client/features/src/main/resources/features.xml b/appc-outbound/appc-aai-client/features/src/main/resources/features.xml
index 84017dd7c..3bc44e268 100644
--- a/appc-outbound/appc-aai-client/features/src/main/resources/features.xml
+++ b/appc-outbound/appc-aai-client/features/src/main/resources/features.xml
@@ -36,7 +36,7 @@
<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
<feature version="${broker-mdsal.version}">odl-mdsal-broker</feature>
- <feature version="${sdnc.sli.version}">sdnc-sli</feature>
+ <feature version="${sdnctl.sli.version}">sdnc-sli</feature>
<feature version="${sdnc.aai.version}">sdnc-aai-service</feature>
<bundle>mvn:commons-lang/commons-lang/2.6</bundle>
<!-- <bundle>mvn:org.apache.velocity/velocity/${velocity.version}</bundle> -->
diff --git a/appc-outbound/appc-network-inventory-client/features/src/main/resources/features.xml b/appc-outbound/appc-network-inventory-client/features/src/main/resources/features.xml
index 6eff11add..e1582378f 100644
--- a/appc-outbound/appc-network-inventory-client/features/src/main/resources/features.xml
+++ b/appc-outbound/appc-network-inventory-client/features/src/main/resources/features.xml
@@ -24,13 +24,13 @@
-->
-<features name="app-cntrl-instar-client-${project.version}"
+<features name="app-cntrl-network-inventory-client-${project.version}"
xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
<repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
- <feature name='app-cntrl-instar-client' description="Application Controller Instar Client"
+ <feature name='app-cntrl-network-inventory' description="Application Controller Instar Client"
version='${project.version}'>
<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
<feature version="${broker-mdsal.version}">odl-mdsal-broker</feature>