commit | 869876066e60e1992c12acc5e1989466821fd7a6 | [log] [tgz] |
---|---|---|
author | Michal Orzel <michalx.orzel@intel.com> | Mon Jun 24 08:19:49 2024 +0200 |
committer | Ed Tanous <ed@tanous.net> | Tue Jun 25 17:42:48 2024 +0000 |
tree | ca17aa2d0f0760dae5be3f3a339ff9235737b53e | |
parent | 3a4994147e856fe5fd39f744b1bdf8d57ed7267b [diff] [blame] |
Add telemetry messages to registry One of Telemetry service's triggers' action is logging events to Redfish log [1][2]. This change appends messages from DMTF schema [3] to registry collection, so that they become available for Telemetry service. Tested: - Telemetry subset present under /redfish/v1/Registries - Telemetry registry details present under /redfish/v1/Registries/Telemetry - Telemetry messages present under /redfish/v1/Registries/Telemetry/Telemetry - Telemetry messages appear in event log (/redfish/v1/Systems/<str>/LogServices/EventLog/Entries) after being sent using phosphor-logging [1] https://github.com/openbmc/docs/blob/master/designs/telemetry.md?plain=1#L423-L426 [2] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml#L61-L62 [3] https://redfish.dmtf.org/registries/Telemetry.1.0.0.json Change-Id: Ic0b82c695fc7755394becd120c301b6056e3ce19 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
diff --git a/redfish-core/src/registries.cpp b/redfish-core/src/registries.cpp index 8c8b36a..61b27b5 100644 --- a/redfish-core/src/registries.cpp +++ b/redfish-core/src/registries.cpp
@@ -2,6 +2,7 @@ #include "registries/base_message_registry.hpp" #include "registries/openbmc_message_registry.hpp" +#include "registries/telemetry_message_registry.hpp" #include "str_utility.hpp" #include <algorithm> @@ -52,6 +53,11 @@ return getMessageFromRegistry( messageKey, std::span<const MessageEntry>(openbmc::registry)); } + if (std::string(telemetry::header.registryPrefix) == registryName) + { + return getMessageFromRegistry( + messageKey, std::span<const MessageEntry>(telemetry::registry)); + } return nullptr; }