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.

Change-Id: I9cc906cc1fa7cdf27be7e433390c516f6bae3c50
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index 9dfdbb0..0e598f3 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -43,7 +43,8 @@
             -> std::shared_ptr<interfaces::Metric> {
             return std::make_shared<Metric>(
                 getSensor(param.at_index<0>()), param.at_index<1>(),
-                param.at_index<2>(), param.at_index<3>());
+                param.at_index<2>(), param.at_index<3>(), param.at_index<4>(),
+                param.at_index<5>());
         });
 
     return std::make_unique<Report>(
@@ -69,7 +70,8 @@
     auto tree = utils::getSubTreeSensors(yield, bus);
 
     return utils::transform(metricParams, [&tree](const auto& item) {
-        const auto& [sensorPath, operationType, id, metadata] = item;
+        const auto& [sensorPath, operationType, id, metadata,
+                     collectionTimeScope, collectionDuration] = item;
 
         auto it = std::find_if(
             tree.begin(), tree.end(),
@@ -80,7 +82,10 @@
             const auto& [service, ifaces] = it->second.front();
             return LabeledMetricParameters(
                 LabeledSensorParameters(service, sensorPath),
-                utils::stringToOperationType(operationType), id, metadata);
+                utils::stringToOperationType(operationType), id, metadata,
+                utils::stringToCollectionTimeScope(collectionTimeScope),
+                CollectionDuration(
+                    std::chrono::milliseconds(collectionDuration)));
         }
 
         throw sdbusplus::exception::SdBusError(