mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-29 19:24:26 +03:00
Feb 22nd 2023 update
This commit is contained in:
@@ -124,7 +124,10 @@ private:
|
||||
map<string, HealthCheckStatus> field_types_status;
|
||||
};
|
||||
|
||||
class setAgentUninstall : public ServerRest
|
||||
class SetAgentUninstall
|
||||
:
|
||||
public ServerRest,
|
||||
Singleton::Consume<I_AgentDetails>
|
||||
{
|
||||
public:
|
||||
void
|
||||
@@ -132,11 +135,13 @@ public:
|
||||
{
|
||||
dbgTrace(D_ORCHESTRATOR) << "Send 'agent uninstall process started' log to fog";
|
||||
setConfiguration(false, "Logging", "Enable bulk of logs");
|
||||
string profile_id = Singleton::Consume<I_AgentDetails>::by<SetAgentUninstall>()->getProfileId();
|
||||
LogGen log (
|
||||
"Agent started uninstall process",
|
||||
Audience::INTERNAL,
|
||||
Severity::INFO,
|
||||
Priority::URGENT,
|
||||
LogField("profileId", profile_id),
|
||||
LogField("issuingEngine", "agentUninstallProvider"),
|
||||
Tags::ORCHESTRATOR
|
||||
);
|
||||
@@ -167,7 +172,7 @@ public:
|
||||
auto rest = Singleton::Consume<I_RestApi>::by<OrchestrationComp>();
|
||||
rest->addRestCall<getStatusRest>(RestAction::SHOW, "orchestration-status");
|
||||
rest->addRestCall<AddProxyRest>(RestAction::ADD, "proxy");
|
||||
rest->addRestCall<setAgentUninstall>(RestAction::SET, "agent-uninstall");
|
||||
rest->addRestCall<SetAgentUninstall>(RestAction::SET, "agent-uninstall");
|
||||
// Main loop of the Orchestration.
|
||||
Singleton::Consume<I_MainLoop>::by<OrchestrationComp>()->addOneTimeRoutine(
|
||||
I_MainLoop::RoutineType::RealTime,
|
||||
|
@@ -312,7 +312,7 @@ TEST_F(OrchestrationTest, testAgentUninstallRest)
|
||||
EXPECT_CALL(
|
||||
rest,
|
||||
mockRestCall(RestAction::ADD, "proxy", _)
|
||||
).WillOnce(WithArg<2>(Invoke(this, &OrchestrationTest::restHandler)));
|
||||
).WillOnce(WithArg<2>(Invoke(this, &OrchestrationTest::restHandler)));
|
||||
|
||||
init();
|
||||
|
||||
|
Reference in New Issue
Block a user