Removed FutureVersion from API

Instead of using FutureVersion API currently used version is updated.
This change needs to be bumped together with [1]. API that utilized map
of variants to be more flexible and backwards compatible was reverted.
It was decided that straight forward API that is commonly used should be
used instead.

Removed MetricId property from Metric. In telemetry it was implemented
as a name for Metric, but it was supposed to work as described in [2].
Currently MetricId is not supported by telemetry service and property
was removed.

Tested:
- After chaging bmcweb to use new API old and new features are working
  as expected

[1]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/44270
[2]: https://redfish.dmtf.org/schemas/v1/MetricReportDefinition.v1_4_2.json

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I5930a466a370f268d68f575a4a3db5ee9655e574
diff --git a/src/utils/conversion_trigger.cpp b/src/utils/conversion_trigger.cpp
index a8417e5..98ae2a5 100644
--- a/src/utils/conversion_trigger.cpp
+++ b/src/utils/conversion_trigger.cpp
@@ -36,7 +36,7 @@
         const auto& [userId, severity, dwellTime,
                      thresholdValue] = thresholdParam;
         return discrete::LabeledThresholdParam(
-            userId, discrete::toSeverity(severity), dwellTime, thresholdValue);
+            userId, utils::toSeverity(severity), dwellTime, thresholdValue);
     });
 }
 
@@ -59,13 +59,13 @@
     const std::vector<discrete::LabeledThresholdParam>& arg) const
 {
     return utils::transform(
-        arg, [](const discrete::LabeledThresholdParam& labeledThresholdParam) {
-            return discrete::ThresholdParam(
-                labeledThresholdParam.at_label<ts::UserId>(),
-                discrete::severityToString(
-                    labeledThresholdParam.at_label<ts::Severity>()),
-                labeledThresholdParam.at_label<ts::DwellTime>(),
-                labeledThresholdParam.at_label<ts::ThresholdValue>());
+        arg,
+        [](const discrete::LabeledThresholdParam& labeledThresholdParam) {
+        return discrete::ThresholdParam(
+            labeledThresholdParam.at_label<ts::UserId>(),
+            utils::enumToString(labeledThresholdParam.at_label<ts::Severity>()),
+            labeledThresholdParam.at_label<ts::DwellTime>(),
+            labeledThresholdParam.at_label<ts::ThresholdValue>());
         });
 }
 
@@ -104,8 +104,7 @@
             }
             return discrete::ThresholdParam(
                 paramUnpacked->at_label<ts::UserId>(),
-                discrete::severityToString(
-                    paramUnpacked->at_label<ts::Severity>()),
+                utils::enumToString(paramUnpacked->at_label<ts::Severity>()),
                 paramUnpacked->at_label<ts::DwellTime>(),
                 paramUnpacked->at_label<ts::ThresholdValue>());
         });
diff --git a/src/utils/to_short_enum.hpp b/src/utils/to_short_enum.hpp
new file mode 100644
index 0000000..56ea88d
--- /dev/null
+++ b/src/utils/to_short_enum.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <string_view>
+
+namespace utils
+{
+
+inline std::string_view toShortEnum(std::string_view name)
+{
+    auto pos = name.find_last_of(".");
+    if (pos != std::string_view::npos && pos + 1 < name.size())
+    {
+        return name.substr(pos + 1);
+    }
+    return name;
+}
+
+} // namespace utils