monitor:JSON: Parse trust groups
Parse and create the list of trust groups functions from a JSON
configuration file.
Tested:
Existing trust groups functions parsed and function correctly
Any required parameters missing cause a runtime exception
Change-Id: I4d24b97c966c97f3ff253d8c96cb0724eff1a8af
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/monitor/main.cpp b/monitor/main.cpp
index e8b736b..52d5bdb 100644
--- a/monitor/main.cpp
+++ b/monitor/main.cpp
@@ -66,6 +66,10 @@
#ifdef MONITOR_USE_JSON
// Get JSON object from monitor JSON config file
const auto& jsonObj = getJsonObj(bus);
+
+ // Retrieve and set trust groups within the trust manager
+ auto trust =
+ std::make_unique<phosphor::fan::trust::Manager>(getTrustGrps(jsonObj));
#else
auto trust = std::make_unique<phosphor::fan::trust::Manager>(trustGroups);