fhq-server  v0.2.33
Documentation for fhq-server. FreeHackQuest is an open source platform for competitions of computer security.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
EmployOrchestra Class Reference

#include <employ_orchestra.h>

Inheritance diagram for EmployOrchestra:
Inheritance graph
[legend]
Collaboration diagram for EmployOrchestra:
Collaboration graph
[legend]

Public Member Functions

 EmployOrchestra ()
 
virtual bool init () override
 
virtual bool deinit () override
 
bool initConnection ()
 
bool create_container (const std::string &sName, std::string &sError)
 
bool create_service (const ServiceConfig &serviceReq, std::string &sError)
 
bool create_service (const nlohmann::json &jsonConfig, std::string &sError)
 
bool check_response (const nlohmann::json &jsonResponse, std::string &sError)
 
bool find_container (const std::string &sName, LXDContainer *&pContainer)
 
bool find_service (const std::string &sName, ServiceLXD *&pService)
 
bool remove_container (const std::string &sName, std::string &sError)
 
bool get_all_profiles (std::vector< std::string > &vecProfiles, std::string &sError)
 
bool find_profile (const std::string &sName, std::string &sError)
 
bool send_post_request_file (const std::string &sUrl, const std::string &sFile, std::string &sResponse, std::string &sError)
 
bool send_post_request (const std::string &sUrl, const nlohmann::json &jsonData, nlohmann::json &jsonResponse, std::string &sError)
 
bool send_patch_request (const std::string &sUrl, const nlohmann::json &jsonData, nlohmann::json &jsonResponse, std::string &sError)
 
bool send_put_request (const std::string &sUrl, const nlohmann::json &jsonData, nlohmann::json &jsonResponse, std::string &sError)
 
bool send_get_request (const std::string &sUrl, nlohmann::json &jsonResponse, std::string &sError)
 
bool send_get_request (const std::string &sUrl, std::string &sResponse, std::string &sError)
 
bool send_get_request_raw (const std::string &sUrl, std::string &sResponse, std::string &sError)
 
bool send_delete_request (const std::string &sUrl, nlohmann::json &jsonResponse, std::string &sError)
 
std::list< std::string > registry_names ()
 
std::string lastError ()
 
- Public Member Functions inherited from WsjcppEmployBase
 WsjcppEmployBase (const std::string &sName, const std::vector< std::string > &vLoadAfter)
 
virtual ~WsjcppEmployBase ()
 
const std::vector< std::string > & loadAfter ()
 

Static Public Member Functions

static std::string name ()
 

Private Member Functions

bool pull_container_names ()
 

Private Attributes

std::map< std::string, LXDContainer * > m_mapContainers
 
std::map< std::string, ServiceLXD * > m_mapServices
 
std::string m_sPathDirLxcSSL
 
std::string m_sLxdAddress
 
std::string m_sLastError
 
std::string TAG
 
bool m_bTrusted
 

Constructor & Destructor Documentation

◆ EmployOrchestra()

EmployOrchestra::EmployOrchestra ( )

Member Function Documentation

◆ check_response()

bool EmployOrchestra::check_response ( const nlohmann::json &  jsonResponse,
std::string &  sError 
)

◆ create_container()

bool EmployOrchestra::create_container ( const std::string &  sName,
std::string &  sError 
)

◆ create_service() [1/2]

bool EmployOrchestra::create_service ( const ServiceConfig serviceReq,
std::string &  sError 
)

◆ create_service() [2/2]

bool EmployOrchestra::create_service ( const nlohmann::json &  jsonConfig,
std::string &  sError 
)

◆ deinit()

bool EmployOrchestra::deinit ( )
overridevirtual

Implements WsjcppEmployBase.

◆ find_container()

bool EmployOrchestra::find_container ( const std::string &  sName,
LXDContainer *&  pContainer 
)

◆ find_profile()

bool EmployOrchestra::find_profile ( const std::string &  sName,
std::string &  sError 
)

◆ find_service()

bool EmployOrchestra::find_service ( const std::string &  sName,
ServiceLXD *&  pService 
)

◆ get_all_profiles()

bool EmployOrchestra::get_all_profiles ( std::vector< std::string > &  vecProfiles,
std::string &  sError 
)

◆ init()

bool EmployOrchestra::init ( )
overridevirtual

Implements WsjcppEmployBase.

◆ initConnection()

bool EmployOrchestra::initConnection ( )

◆ lastError()

std::string EmployOrchestra::lastError ( )

◆ name()

static std::string EmployOrchestra::name ( )
inlinestatic

◆ pull_container_names()

bool EmployOrchestra::pull_container_names ( )
private

◆ registry_names()

std::list< std::string > EmployOrchestra::registry_names ( )

◆ remove_container()

bool EmployOrchestra::remove_container ( const std::string &  sName,
std::string &  sError 
)

◆ send_delete_request()

bool EmployOrchestra::send_delete_request ( const std::string &  sUrl,
nlohmann::json &  jsonResponse,
std::string &  sError 
)

◆ send_get_request() [1/2]

bool EmployOrchestra::send_get_request ( const std::string &  sUrl,
nlohmann::json &  jsonResponse,
std::string &  sError 
)

◆ send_get_request() [2/2]

bool EmployOrchestra::send_get_request ( const std::string &  sUrl,
std::string &  sResponse,
std::string &  sError 
)

◆ send_get_request_raw()

bool EmployOrchestra::send_get_request_raw ( const std::string &  sUrl,
std::string &  sResponse,
std::string &  sError 
)

◆ send_patch_request()

bool EmployOrchestra::send_patch_request ( const std::string &  sUrl,
const nlohmann::json &  jsonData,
nlohmann::json &  jsonResponse,
std::string &  sError 
)

◆ send_post_request()

bool EmployOrchestra::send_post_request ( const std::string &  sUrl,
const nlohmann::json &  jsonData,
nlohmann::json &  jsonResponse,
std::string &  sError 
)

◆ send_post_request_file()

bool EmployOrchestra::send_post_request_file ( const std::string &  sUrl,
const std::string &  sFile,
std::string &  sResponse,
std::string &  sError 
)

◆ send_put_request()

bool EmployOrchestra::send_put_request ( const std::string &  sUrl,
const nlohmann::json &  jsonData,
nlohmann::json &  jsonResponse,
std::string &  sError 
)

Member Data Documentation

◆ m_bTrusted

bool EmployOrchestra::m_bTrusted
private

◆ m_mapContainers

std::map<std::string, LXDContainer *> EmployOrchestra::m_mapContainers
private

◆ m_mapServices

std::map<std::string, ServiceLXD *> EmployOrchestra::m_mapServices
private

◆ m_sLastError

std::string EmployOrchestra::m_sLastError
private

◆ m_sLxdAddress

std::string EmployOrchestra::m_sLxdAddress
private

◆ m_sPathDirLxcSSL

std::string EmployOrchestra::m_sPathDirLxcSSL
private

◆ TAG

std::string EmployOrchestra::TAG
private

The documentation for this class was generated from the following files: