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/interfaces/trigger_factory.hpp b/src/interfaces/trigger_factory.hpp
index d493b4a..b84ce73 100644
--- a/src/interfaces/trigger_factory.hpp
+++ b/src/interfaces/trigger_factory.hpp
@@ -20,15 +20,17 @@
virtual ~TriggerFactory() = default;
virtual 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::string& name, bool isDiscrete, bool logToJournal,
+ bool logToRedfish, bool updateReport,
const std::vector<std::string>& reportNames,
- const TriggerThresholdParams& thresholdParams,
interfaces::TriggerManager& triggerManager,
- interfaces::JsonStorage& triggerStorage) const = 0;
+ interfaces::JsonStorage& triggerStorage,
+ const LabeledTriggerThresholdParams& labeledThresholdParams,
+ const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const = 0;
+
+ virtual std::vector<LabeledSensorInfo>
+ getLabeledSensorsInfo(boost::asio::yield_context& yield,
+ const SensorsInfo& sensorsInfo) const = 0;
};
} // namespace interfaces