added Enabled to AddReportFutureVersion API
- New parameter added to API
- Changed API to be more flexible in the future
Tested:
- Unit tests are passing
- Tested together with:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/49796/23
POST, PATCH, PUT for MetricReportDefinitions are working correctly
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: Ic988446d283a581dc6866418b1b27a989c3bc9a0
diff --git a/src/types/report_types.hpp b/src/types/report_types.hpp
index d927d0e..49dca73 100644
--- a/src/types/report_types.hpp
+++ b/src/types/report_types.hpp
@@ -13,6 +13,7 @@
#include <string>
#include <tuple>
#include <type_traits>
+#include <variant>
#include <vector>
using ReadingParametersPastVersion =
@@ -30,5 +31,9 @@
utils::tstring::Id, utils::tstring::CollectionTimeScope,
utils::tstring::CollectionDuration>;
+using AddReportFutureVersionVariant =
+ std::variant<std::monostate, bool, uint64_t, std::string,
+ std::vector<std::string>, ReadingParameters>;
+
ReadingParameters
toReadingParameters(const std::vector<LabeledMetricParameters>& labeled);