Read persistent triggers from storage

Read json storage file for persistent triggers.
Add trigger to telemetry service.
Cover code with UTs.

Tested:
  - Passed unit tests
  - Tested on QEMU
    * starting app without configuration
    * restart app with configuration stored
    * restart app with configuration in incorrect version
    * restart app with configuration malformed

Change-Id: I2cb9324abdb8323be8a7f0c932ed7f70c5bc2891
Signed-off-by: Cezary Zwolak <cezary.zwolak@intel.com>
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
diff --git a/src/trigger_factory.hpp b/src/trigger_factory.hpp
index a6fbb68..7c13e55 100644
--- a/src/trigger_factory.hpp
+++ b/src/trigger_factory.hpp
@@ -15,16 +15,19 @@
                    SensorCache& sensorCache,
                    interfaces::ReportManager& reportManager);
 
-    std::unique_ptr<interfaces::Trigger> make(
-        boost::asio::yield_context& yield, const std::string& name,
-        bool isDiscrete, bool logToJournal, bool logToRedfish,
-        bool updateReport,
-        const std::vector<
-            std::pair<sdbusplus::message::object_path, std::string>>& sensors,
-        const std::vector<std::string>& reportNames,
-        const TriggerThresholdParams& thresholdParams,
-        interfaces::TriggerManager& triggerManager,
-        interfaces::JsonStorage& triggerStorage) const override;
+    std::unique_ptr<interfaces::Trigger>
+        make(const std::string& name, bool isDiscrete, bool logToJournal,
+             bool logToRedfish, bool updateReport,
+             const std::vector<std::string>& reportNames,
+             interfaces::TriggerManager& triggerManager,
+             interfaces::JsonStorage& triggerStorage,
+             const LabeledTriggerThresholdParams& labeledThresholdParams,
+             const std::vector<LabeledSensorInfo>& labeledSensorsinfo)
+            const override;
+
+    std::vector<LabeledSensorInfo>
+        getLabeledSensorsInfo(boost::asio::yield_context& yield,
+                              const SensorsInfo& sensorsInfo) const;
 
   private:
     std::shared_ptr<sdbusplus::asio::connection> bus;
@@ -34,8 +37,6 @@
 
     std::pair<std::vector<std::shared_ptr<interfaces::Sensor>>,
               std::vector<std::string>>
-        getSensors(boost::asio::yield_context& yield,
-                   const std::vector<
-                       std::pair<sdbusplus::message::object_path, std::string>>&
-                       sensorPaths) const;
+        getSensors(
+            const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const;
 };