X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=appc-dg%2Fappc-dg-shared%2Fappc-dg-ssh%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fappc%2Fdg%2Fssh%2Fimpl%2FSshServiceImpl.java;fp=appc-dg%2Fappc-dg-shared%2Fappc-dg-ssh%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fappc%2Fdg%2Fssh%2Fimpl%2FSshServiceImpl.java;h=1c7cc1b95ee2a2209c3fed4ff26792f46885ed34;hb=b5fe8a69e90b950c07dc11af481eab7e9bab52c6;hp=e758f36a213db8f8da8242781bc3eda37adba324;hpb=9b32cb60360a2a2973c621053510718de0072111;p=appc.git diff --git a/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/onap/appc/dg/ssh/impl/SshServiceImpl.java b/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/onap/appc/dg/ssh/impl/SshServiceImpl.java index e758f36a2..1c7cc1b95 100644 --- a/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/onap/appc/dg/ssh/impl/SshServiceImpl.java +++ b/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/onap/appc/dg/ssh/impl/SshServiceImpl.java @@ -2,24 +2,21 @@ * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs - * ================================================================================ - * Modifications (C) 2019 Ericsson * ============================================================================= * 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. - * * ============LICENSE_END========================================================= */ @@ -48,6 +45,11 @@ public class SshServiceImpl implements SshService { private SshAdapter sshAdapter; + /** + * Set sshAdapter. + *
Used through blueprint.
+ * @param sshAdapter the SshAdapter
+ */
public void setSshAdapter(SshAdapter sshAdapter) {
this.sshAdapter = sshAdapter;
}
@@ -57,7 +59,9 @@ public class SshServiceImpl implements SshService {
SshConnectionDetails connectionDetails = resolveConnectionDetails(params.get(PARAM_IN_connection_details));
String command = params.get(PARAM_IN_command);
logger.debug("=> Connecting to SSH server...");
- SshConnection sshConnection = sshAdapter.getConnection(connectionDetails.getHost(), connectionDetails.getPort(), connectionDetails.getUsername(), connectionDetails.getPassword());
+ SshConnection sshConnection =
+ sshAdapter.getConnection(connectionDetails.getHost(), connectionDetails.getPort(),
+ connectionDetails.getUsername(), connectionDetails.getPassword());
sshConnection.connect();
try {
logger.debug("=> Connected to SSH server...");
@@ -97,11 +101,11 @@ public class SshServiceImpl implements SshService {
public void execWithStatusCheck(Map