2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2015-06-24 15:09:22 +02:00
|
|
|
|
|
|
|
#ifndef APISETUPUTILITY_H
|
|
|
|
#define APISETUPUTILITY_H
|
|
|
|
|
|
|
|
#include "base/i2-base.hpp"
|
|
|
|
#include "cli/i2-cli.hpp"
|
|
|
|
#include "base/dictionary.hpp"
|
|
|
|
#include "base/array.hpp"
|
|
|
|
#include "base/value.hpp"
|
|
|
|
#include "base/string.hpp"
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup cli
|
|
|
|
*/
|
2017-12-31 07:22:16 +01:00
|
|
|
class ApiSetupUtility
|
2015-06-24 15:09:22 +02:00
|
|
|
{
|
|
|
|
public:
|
2018-07-26 17:09:06 +02:00
|
|
|
static bool SetupMaster(const String& cn, bool prompt_restart = false);
|
2015-07-08 15:32:11 +02:00
|
|
|
|
2015-10-22 15:56:27 +02:00
|
|
|
static bool SetupMasterCertificates(const String& cn);
|
2018-01-04 04:25:35 +01:00
|
|
|
static bool SetupMasterApiUser();
|
2018-07-26 17:09:06 +02:00
|
|
|
static bool SetupMasterEnableApi();
|
2017-11-28 13:38:53 +01:00
|
|
|
static bool SetupMasterUpdateConstants(const String& cn);
|
2015-07-08 15:32:11 +02:00
|
|
|
|
2018-01-04 04:25:35 +01:00
|
|
|
static String GetConfdPath();
|
2018-05-08 16:06:10 +02:00
|
|
|
static String GetApiUsersConfPath();
|
2015-06-24 15:09:22 +02:00
|
|
|
|
|
|
|
private:
|
2018-01-04 04:25:35 +01:00
|
|
|
ApiSetupUtility();
|
2015-06-24 15:09:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* APISETUPUTILITY_H */
|