Add 'latest' hidden option to restore
This commit is contained in:
@ -56,10 +56,6 @@ class service_runner {
|
||||
std::string healthtick();
|
||||
std::string healthmark();
|
||||
|
||||
// get the status of all services on the server
|
||||
static std::map<std::string, ServiceStatus> get_all_services_status(std::string server_name);
|
||||
static std::string HealthStatus2String(HealthStatus status);
|
||||
|
||||
private:
|
||||
// install the service over ssh, using the credentials from server.env (via server_env.hpp), by:
|
||||
// 1. check if the server_name exists, and the service_name refers to a valid template
|
||||
@ -91,6 +87,16 @@ class service_runner {
|
||||
// edit the service configuration file
|
||||
void edit_service_config();
|
||||
|
||||
|
||||
public:
|
||||
// utility functions
|
||||
static std::string get_latest_backup_file(const std::string& server, const std::string& service);
|
||||
static void interactive_ssh(const std::string & server_name, const std::string & command);
|
||||
static void edit_server(const std::string & server_name);
|
||||
static bool edit_file(const std::string & file_path);
|
||||
static std::map<std::string, ServiceStatus> get_all_services_status(std::string server_name);
|
||||
static std::string HealthStatus2String(HealthStatus status);
|
||||
|
||||
private:
|
||||
std::string mServer;
|
||||
server_env_manager mServerEnv;
|
||||
@ -112,13 +118,6 @@ class service_runner {
|
||||
const server_env_manager & mServerEnv;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// other utility routines (not specific to service_runner)
|
||||
void interactive_ssh(const std::string & server_name, const std::string & command);
|
||||
void edit_server(const std::string & server_name);
|
||||
bool edit_file(const std::string & file_path);
|
||||
|
||||
} // namespace dropshell
|
||||
|
||||
#endif // SERVICE_RUNNER_HPP
|
||||
|
Reference in New Issue
Block a user