return 0;
}
+ SetupMasterCertificates(cn);
+ SetupMasterApiUser(cn);
+ SetupMasterEnableApi(cn);
+
+ return 0;
+}
+
+int ApiSetupUtility::SetupMasterCertificates(const String& cn)
+{
Log(LogInformation, "cli")
<< "Generating new CA.\n";
}
}
+ return 0;
+}
+
+int ApiSetupUtility::SetupMasterApiUser(const String& cn)
+{
String api_username = "root"; //TODO make this available as cli parameter?
String api_password = RandomString(8);
String apiuserspath = GetConfdPath() + "/api-users.conf";
<< boost::errinfo_file_name(apiuserspathtmp));
}
+ return 0;
+}
+int ApiSetupUtility::SetupMasterEnableApi(const String& cn)
+{
Log(LogInformation, "cli", "Enabling the ApiListener feature.\n");
std::vector<std::string> enable;
{
public:
static int SetupMaster(const String& cn);
+
+ static int SetupMasterCertificates(const String& cn);
+ static int SetupMasterApiUser(const String& cn);
+ static int SetupMasterEnableApi(const String& cn);
+
static String GetConfdPath(void);
private: