mirror of https://github.com/Icinga/icinga2.git
parent
fd4abff369
commit
752df8ea28
|
@ -31,6 +31,7 @@ REGISTER_APIACTION(remove_downtime, "Service;Host;Downtime", &ApiActions::Remove
|
|||
REGISTER_APIACTION(shutdown_process, "", &ApiActions::ShutdownProcess);
|
||||
REGISTER_APIACTION(restart_process, "", &ApiActions::RestartProcess);
|
||||
REGISTER_APIACTION(generate_ticket, "", &ApiActions::GenerateTicket);
|
||||
REGISTER_APIACTION(execute_command, "Service;Host", &ApiActions::ExecuteCommand);
|
||||
|
||||
Dictionary::Ptr ApiActions::CreateResult(int code, const String& status,
|
||||
const Dictionary::Ptr& additional)
|
||||
|
@ -550,3 +551,9 @@ Dictionary::Ptr ApiActions::GenerateTicket(const ConfigObject::Ptr&,
|
|||
return ApiActions::CreateResult(200, "Generated PKI ticket '" + ticket + "' for common name '"
|
||||
+ cn + "'.", additional);
|
||||
}
|
||||
|
||||
Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
||||
const Dictionary::Ptr& params)
|
||||
{
|
||||
return ApiActions::CreateResult(501, "Not implemented");
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
static Dictionary::Ptr ShutdownProcess(const ConfigObject::Ptr& object, const Dictionary::Ptr& params);
|
||||
static Dictionary::Ptr RestartProcess(const ConfigObject::Ptr& object, const Dictionary::Ptr& params);
|
||||
static Dictionary::Ptr GenerateTicket(const ConfigObject::Ptr& object, const Dictionary::Ptr& params);
|
||||
static Dictionary::Ptr ExecuteCommand(const ConfigObject::Ptr& object, const Dictionary::Ptr& params);
|
||||
|
||||
private:
|
||||
static Dictionary::Ptr CreateResult(int code, const String& status, const Dictionary::Ptr& additional = nullptr);
|
||||
|
|
Loading…
Reference in New Issue