moved passphraseCallback and passphraseDialog to startPage
- made some methods of the servercontroller class private - returned a call to the checkSshConnection() function
This commit is contained in:
parent
4aba34c18b
commit
1aa859b10d
9 changed files with 66 additions and 86 deletions
|
|
@ -92,7 +92,6 @@ ErrorCode ServerController::runScript(const ServerCredentials &credentials, QStr
|
|||
return ErrorCode::NoError;
|
||||
}
|
||||
|
||||
|
||||
ErrorCode ServerController::runContainerScript(const ServerCredentials &credentials,
|
||||
DockerContainer container, QString script,
|
||||
const std::function<ErrorCode (const QString &, libssh::Client &)> &cbReadStdOut,
|
||||
|
|
@ -203,21 +202,6 @@ QByteArray ServerController::getTextFileFromContainer(DockerContainer container,
|
|||
return QByteArray::fromHex(stdOut.toUtf8());
|
||||
}
|
||||
|
||||
ErrorCode ServerController::checkOpenVpnServer(DockerContainer container, const ServerCredentials &credentials)
|
||||
{
|
||||
QString caCert = ServerController::getTextFileFromContainer(container,
|
||||
credentials, protocols::openvpn::caCertPath);
|
||||
QString taKey = ServerController::getTextFileFromContainer(container,
|
||||
credentials, protocols::openvpn::taKeyPath);
|
||||
|
||||
if (!caCert.isEmpty() && !taKey.isEmpty()) {
|
||||
return ErrorCode::NoError;
|
||||
}
|
||||
else {
|
||||
return ErrorCode::ServerCheckFailed;
|
||||
}
|
||||
}
|
||||
|
||||
ErrorCode ServerController::uploadFileToHost(const ServerCredentials &credentials, const QByteArray &data, const QString &remotePath,
|
||||
libssh::SftpOverwriteMode overwriteMode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue