control: Load JSON configured groups and events

Load the JSON configured groups and events, removing the remaining
references to the YAML based groups, triggers, and actions types. JSON
configured groups are loaded and provided to each event so that they can
eventually be copied and updated for the specifics of the event.

Change-Id: If713809b2865b5fe84b7bbb5a086cd49ba7fe55c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index bd5261c..b1b5f91 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -18,6 +18,7 @@
 #include "manager.hpp"
 
 #include "action.hpp"
+#include "event.hpp"
 #include "fan.hpp"
 #include "group.hpp"
 #include "json_config.hpp"
@@ -90,6 +91,12 @@
         }
     }
 
+    // Load the configured groups that are copied into events where they're used
+    auto groups = getConfig<Group>(true, bus);
+
+    // Load any events configured
+    _events = getConfig<Event>(true, bus, bus, groups);
+
     bus.request_name(CONTROL_BUSNAME);
 }