Checking mode directly

This commit is contained in:
Ned Wright 2023-12-21 17:53:03 +00:00
parent de31400712
commit 3282774432

View File

@ -219,7 +219,7 @@ private:
start() start()
{ {
auto update_communication = Singleton::Consume<I_UpdateCommunication>::by<OrchestrationComp>(); auto update_communication = Singleton::Consume<I_UpdateCommunication>::by<OrchestrationComp>();
auto agent_mode = Singleton::Consume<I_AgentDetails>::by<OrchestrationComp>()->getOrchestrationMode(); auto agent_mode = getOrchestrationMode();
auto policy_mgmt_mode = getSettingWithDefault<string>("management", "profileManagedMode"); auto policy_mgmt_mode = getSettingWithDefault<string>("management", "profileManagedMode");
if (agent_mode == OrchestrationMode::HYBRID || policy_mgmt_mode == "declarative") { if (agent_mode == OrchestrationMode::HYBRID || policy_mgmt_mode == "declarative") {
update_communication->authenticateAgent(); update_communication->authenticateAgent();