created AddReportFutureVersion dbus method
New method will support CollectionTimeScope, CollectionDuration
In order to make not breaking interface changes bmcweb will switch to
AddReportFutureVersion, then AddReport will be changed to match
AddReportFutureVersion, then redfish will switch back to use AddReport,
then AddReportFutureVersion will be removed.
Tested:
- Verified that current version of bmcweb works fine with old API
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I51a9b7fb2f4da5b8d2f688ccd5e93710352b1ac7
diff --git a/tests/src/helpers/interfaces/labeled_reading_parameter_helpers.hpp b/tests/src/helpers/interfaces/labeled_reading_parameter_helpers.hpp
deleted file mode 100644
index 9a46d0c..0000000
--- a/tests/src/helpers/interfaces/labeled_reading_parameter_helpers.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#pragma once
-
-#include "helpers/interfaces/labeled_sensor_parameter_helpers.hpp"
-#include "interfaces/types.hpp"
-
-#include <ostream>
-
-#include <gmock/gmock.h>
-
-namespace utils
-{
-
-inline void PrintTo(const LabeledMetricParameters& o, std::ostream* os)
-{
- using testing::PrintToString;
-
- (*os) << "{ ";
- (*os) << utils::tstring::SensorPath::str() << ": "
- << PrintToString(o.at_label<utils::tstring::SensorPath>()) << ", ";
- (*os) << utils::tstring::OperationType::str() << ": "
- << PrintToString(o.at_label<utils::tstring::OperationType>()) << ", ";
- (*os) << utils::tstring::Id::str() << ": "
- << PrintToString(o.at_label<utils::tstring::Id>()) << ", ";
- (*os) << utils::tstring::MetricMetadata::str() << ": "
- << PrintToString(o.at_label<utils::tstring::MetricMetadata>());
- (*os) << " }";
-}
-
-} // namespace utils
diff --git a/tests/src/helpers/interfaces/labeled_sensor_parameter_helpers.hpp b/tests/src/helpers/interfaces/labeled_sensor_parameter_helpers.hpp
deleted file mode 100644
index ef2eb6b..0000000
--- a/tests/src/helpers/interfaces/labeled_sensor_parameter_helpers.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#pragma once
-
-#include "interfaces/types.hpp"
-
-#include <ostream>
-
-#include <gmock/gmock.h>
-
-namespace utils
-{
-
-inline void PrintTo(const LabeledSensorParameters& o, std::ostream* os)
-{
- using testing::PrintToString;
-
- (*os) << "{ ";
- (*os) << utils::tstring::Service::str() << ": "
- << PrintToString(o.at_label<utils::tstring::Service>()) << ", ";
- (*os) << utils::tstring::Path::str() << ": "
- << PrintToString(o.at_label<utils::tstring::Path>());
- (*os) << " }";
-}
-
-} // namespace utils
\ No newline at end of file
diff --git a/tests/src/helpers/labeled_tuple_helpers.hpp b/tests/src/helpers/labeled_tuple_helpers.hpp
new file mode 100644
index 0000000..4ee70c1
--- /dev/null
+++ b/tests/src/helpers/labeled_tuple_helpers.hpp
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "utils/labeled_tuple.hpp"
+
+#include <iomanip>
+
+namespace utils
+{
+
+template <class... Args, class... Labels>
+inline void
+ PrintTo(const LabeledTuple<std::tuple<Args...>, Labels...>& labeledTuple,
+ std::ostream* os)
+{
+ nlohmann::json json;
+ to_json(json, labeledTuple);
+
+ (*os) << std::setw(2) << json;
+}
+
+} // namespace utils