1 #ifndef EMPLOY_ORCHESTRA 2 #define EMPLOY_ORCHESTRA 10 #include <curl/curl.h> 18 static std::string
name() {
return "EmployOrchestra"; }
20 virtual bool init()
override;
21 virtual bool deinit()
override;
26 bool create_service(
const nlohmann::json &jsonConfig, std::string &sError);
27 bool check_response(
const nlohmann::json &jsonResponse, std::string &sError);
31 bool get_all_profiles(std::vector<std::string> &vecProfiles, std::string &sError);
32 bool find_profile(
const std::string &sName, std::string &sError);
35 bool send_post_request(
const std::string &sUrl,
const nlohmann::json &jsonData, nlohmann::json &jsonResponse,
37 bool send_patch_request(
const std::string &sUrl,
const nlohmann::json &jsonData, nlohmann::json &jsonResponse,
39 bool send_put_request(
const std::string &sUrl,
const nlohmann::json &jsonData, nlohmann::json &jsonResponse,
41 bool send_get_request(
const std::string &sUrl, nlohmann::json &jsonResponse, std::string &sError);
42 bool send_get_request(
const std::string &sUrl, std::string &sResponse, std::string &sError);
44 bool send_delete_request(
const std::string &sUrl, nlohmann::json &jsonResponse, std::string &sError);
62 #endif // EMPLOY_ORCHESTRA bool remove_container(const std::string &sName, std::string &sError)
Definition: employ_orchestra.cpp:549
bool send_put_request(const std::string &sUrl, const nlohmann::json &jsonData, nlohmann::json &jsonResponse, std::string &sError)
Definition: employ_orchestra.cpp:325
bool create_service(const ServiceConfig &serviceReq, std::string &sError)
Definition: employ_orchestra.cpp:104
bool send_get_request_raw(const std::string &sUrl, std::string &sResponse, std::string &sError)
Definition: employ_orchestra.cpp:375
bool send_get_request(const std::string &sUrl, nlohmann::json &jsonResponse, std::string &sError)
Definition: employ_orchestra.cpp:412
static std::string name()
Definition: employ_orchestra.h:18
bool send_delete_request(const std::string &sUrl, nlohmann::json &jsonResponse, std::string &sError)
Definition: employ_orchestra.cpp:435
std::map< std::string, ServiceLXD * > m_mapServices
Definition: employ_orchestra.h:51
std::string m_sLastError
Definition: employ_orchestra.h:54
Definition: model_lxd_orchestra.h:10
std::string lastError()
Definition: employ_orchestra.cpp:79
bool send_patch_request(const std::string &sUrl, const nlohmann::json &jsonData, nlohmann::json &jsonResponse, std::string &sError)
Definition: employ_orchestra.cpp:275
bool initConnection()
Definition: employ_orchestra.cpp:69
std::list< std::string > registry_names()
Definition: employ_orchestra.cpp:573
virtual bool init() override
Definition: employ_orchestra.cpp:36
virtual bool deinit() override
Definition: employ_orchestra.cpp:62
std::string TAG
Definition: employ_orchestra.h:55
bool find_service(const std::string &sName, ServiceLXD *&pService)
Definition: employ_orchestra.cpp:135
Definition: wsjcpp_employees.h:13
std::string m_sLxdAddress
Definition: employ_orchestra.h:53
Definition: model_lxd_orchestra.h:26
EmployOrchestra()
Definition: employ_orchestra.cpp:20
bool pull_container_names()
Definition: employ_orchestra.cpp:481
Definition: employ_orchestra.h:14
std::string m_sPathDirLxcSSL
Definition: employ_orchestra.h:52
std::map< std::string, LXDContainer * > m_mapContainers
Definition: employ_orchestra.h:50
bool send_post_request(const std::string &sUrl, const nlohmann::json &jsonData, nlohmann::json &jsonResponse, std::string &sError)
Definition: employ_orchestra.cpp:227
bool find_container(const std::string &sName, LXDContainer *&pContainer)
Definition: employ_orchestra.cpp:126
bool m_bTrusted
Definition: employ_orchestra.h:57
bool get_all_profiles(std::vector< std::string > &vecProfiles, std::string &sError)
Definition: employ_orchestra.cpp:144
Definition: model_lxd_orchestra.h:66
bool create_container(const std::string &sName, std::string &sError)
Definition: employ_orchestra.cpp:85
bool send_post_request_file(const std::string &sUrl, const std::string &sFile, std::string &sResponse, std::string &sError)
Definition: employ_orchestra.cpp:182
bool find_profile(const std::string &sName, std::string &sError)
Definition: employ_orchestra.cpp:161
bool check_response(const nlohmann::json &jsonResponse, std::string &sError)
Definition: employ_orchestra.cpp:522