summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-ssh-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'appc-adapters/appc-ssh-adapter')
-rw-r--r--appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/onap/appc/adapter/ssh/Constants.java2
-rw-r--r--appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/src/main/java/org/onap/appc/adapter/ssh/sshd/SshConnectionSshd.java16
2 files changed, 8 insertions, 10 deletions
diff --git a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/onap/appc/adapter/ssh/Constants.java b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/onap/appc/adapter/ssh/Constants.java
index d3ed28a75..85a142245 100644
--- a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/onap/appc/adapter/ssh/Constants.java
+++ b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/onap/appc/adapter/ssh/Constants.java
@@ -44,7 +44,7 @@ public class Constants {
public static final String REQUEST_ID_FIELD_NAME = "REQUEST_ID";
public static final String CREATION_DATE_FIELD_NAME = "CREATION_DATE";
public static final String LOG_FIELD_NAME = "LOG";
- public static final String ASDC_ARTIFACTS_TABLE_NAME = "ASDC_ARTIFACTS";
+ public static final String SDC_ARTIFACTS_TABLE_NAME = "ASDC_ARTIFACTS";
// input fields names
public static final String PAYLOAD = "payload";
diff --git a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/src/main/java/org/onap/appc/adapter/ssh/sshd/SshConnectionSshd.java b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/src/main/java/org/onap/appc/adapter/ssh/sshd/SshConnectionSshd.java
index c35c58798..44cedc3bb 100644
--- a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/src/main/java/org/onap/appc/adapter/ssh/sshd/SshConnectionSshd.java
+++ b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/src/main/java/org/onap/appc/adapter/ssh/sshd/SshConnectionSshd.java
@@ -117,9 +117,9 @@ class SshConnectionSshd implements SshConnection {
@Override
public void connectWithRetry() {
- int retryCount = 0;
- int retryDelay = 0;
- int retriesLeft = 0;
+ int retryCount ;
+ int retryDelay ;
+ int retriesLeft;
retryCount = configuration.getIntegerProperty(Constants.CONNECTION_RETRY_COUNT,
Constants.DEFAULT_CONNECTION_RETRY_COUNT);
retryDelay = configuration.getIntegerProperty(Constants.CONNECTION_RETRY_DELAY,
@@ -139,9 +139,7 @@ class SshConnectionSshd implements SshConnection {
} else {
throw e;
}
- } catch (Exception e) {
- throw e;
- }
+ }
} while (retriesLeft > 0);
}
@@ -184,7 +182,7 @@ class SshConnectionSshd implements SshConnection {
client.setOut(out);
client.setErr(err);
OpenFuture openFuture = client.open();
- int exitStatus = 0;
+ int exitStatus;
try {
client.waitFor(ClientChannel.CLOSED, timeout);
openFuture.verify();
@@ -200,9 +198,9 @@ class SshConnectionSshd implements SshConnection {
return exitStatus;
} catch (RuntimeException e) {
throw e;
- } catch (Exception t) {
+ } catch (Exception e1) {
throw new SshException(
- "Error executing command [" + cmd + "] over SSH [" + username + "@" + host + ":" + port + "]", t);
+ "Error executing command [" + cmd + "] over SSH [" + username + "@" + host + ":" + port + "]", e1);
}
}