List tidy
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 11s

This commit is contained in:
Your Name
2025-05-24 17:00:43 +12:00
parent b3398582ca
commit 60907e5e02
18 changed files with 128 additions and 89 deletions

View File

@@ -21,7 +21,7 @@ namespace dropshell
if (ctx.args.size() == 0)
{ // just the command, no args yet.
// list servers
std::vector<server_config> servers = get_configured_servers();
std::vector<ServerConfig> servers = get_configured_servers();
for (const auto &server : servers)
{
rawout << server.get_server_name() << std::endl;
@@ -54,7 +54,7 @@ namespace dropshell
bool rsync_tree_to_remote(
const std::string &local_path,
const std::string &remote_path,
const server_config &server_env,
const ServerConfig &server_env,
bool silent,
std::string user)
{
@@ -85,7 +85,7 @@ namespace dropshell
// ------------------------------------------------------------------------------------------------
// cRemoteTempFolder : SHARED CLASS
// ------------------------------------------------------------------------------------------------
cRemoteTempFolder::cRemoteTempFolder(const server_config &server_env, std::string user) :
cRemoteTempFolder::cRemoteTempFolder(const ServerConfig &server_env, std::string user) :
mServerEnv(server_env), mUser(user)
{
std::string p = remotepath(server_env.get_server_name(),user).temp_files() + "/" + random_alphanumeric_string(10);
@@ -110,7 +110,7 @@ namespace dropshell
// ------------------------------------------------------------------------------------------------
// get_all_services_status : SHARED COMMAND
// ------------------------------------------------------------------------------------------------
std::map<std::string, ServiceStatus> get_all_services_status(const server_config & server_env)
std::map<std::string, ServiceStatus> get_all_services_status(const ServerConfig & server_env)
{
std::map<std::string, ServiceStatus> status;
for (const auto& user : server_env.get_users()) {
@@ -119,7 +119,7 @@ namespace dropshell
return status;
}
std::map<std::string, ServiceStatus> get_all_services_status(const server_config & server_env, std::string user)
std::map<std::string, ServiceStatus> get_all_services_status(const ServerConfig & server_env, std::string user)
{
std::map<std::string, ServiceStatus> status;
std::string server_name = server_env.get_server_name();
@@ -216,7 +216,7 @@ namespace dropshell
// ------------------------------------------------------------------------------------------------
HealthStatus is_healthy(const std::string &server, const std::string &service)
{
server_config env(server);
ServerConfig env(server);
if (!env.is_valid())
{
error << "Server service not initialized" << std::endl;
@@ -309,7 +309,7 @@ namespace dropshell
// ------------------------------------------------------------------------------------------------
// scp_file_to_remote : SHARED COMMAND
// ------------------------------------------------------------------------------------------------
bool scp_file_to_remote(const server_config &server_env, const std::string &local_path, const std::string &remote_path, bool silent, std::string user)
bool scp_file_to_remote(const ServerConfig &server_env, const std::string &local_path, const std::string &remote_path, bool silent, std::string user)
{
if (!server_env.is_valid())
{
@@ -324,7 +324,7 @@ namespace dropshell
// ------------------------------------------------------------------------------------------------
// scp_file_from_remote : SHARED COMMAND
// ------------------------------------------------------------------------------------------------
bool scp_file_from_remote(const server_config &server_env, const std::string &remote_path, const std::string &local_path, bool silent, std::string user)
bool scp_file_from_remote(const ServerConfig &server_env, const std::string &remote_path, const std::string &local_path, bool silent, std::string user)
{
if (!server_env.is_valid())
{