Package org.qubership.atp.mia.repo.impl
Class SshConnectionManager
java.lang.Object
org.qubership.atp.mia.repo.impl.SshConnectionManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Constructor Summary
ConstructorsConstructorDescriptionSshConnectionManager(SshSession session, String extPrefix, MiaContext miaContext) Creates instance ofSshConnectionManager. -
Method Summary
Modifier and TypeMethodDescriptionGets connectionInfo.Gets executed command.getFileFromServer(String path, String workingDirectory) Get file from ssh server.voidputFileFromServer(Path pathToFile, String pathToUpLoad) Put file from ssh server.voidremoveFileFromServer(String pathToFile) Remove file from ssh server.runCommand(String command) Executes SSH command with external environment specific.voidtransferFileOnServer(String pathToFile, String pathToUpLoad) Transfer a file.voiduploadFileOnServer(File file, String pathToUpLoad, String workingDirectory) Uploads a file.
-
Constructor Details
-
SshConnectionManager
Creates instance ofSshConnectionManager. It's recommended to use
instead of a manual creation.ConnectionPool#getConnection(Server, String, FlowData)
-
-
Method Details
-
runCommand
Executes SSH command with external environment specific.- Parameters:
command- command to execute- Returns:
- output of command execution
-
uploadFileOnServer
Uploads a file. -
transferFileOnServer
Transfer a file. -
getFileFromServer
Get file from ssh server. -
putFileFromServer
Put file from ssh server. -
removeFileFromServer
Remove file from ssh server. -
getExecutedCommand
Gets executed command.- Returns:
- executed command
-
connectionInfo
Gets connectionInfo.- Returns:
- MAP with information about host and user.
-