xref: /openbmc/bmcweb/features/redfish/include/utils/telemetry_utils.hpp (revision 07148cf2fcaf7c255fe6a21acd4e7b2134fb1d92)
1 #pragma once
2 
3 #include "dbus_utility.hpp"
4 
5 namespace redfish
6 {
7 
8 namespace telemetry
9 {
10 constexpr const char* service = "xyz.openbmc_project.Telemetry";
11 constexpr const char* reportInterface = "xyz.openbmc_project.Telemetry.Report";
12 constexpr const char* metricReportDefinitionUri =
13     "/redfish/v1/TelemetryService/MetricReportDefinitions";
14 constexpr const char* metricReportUri =
15     "/redfish/v1/TelemetryService/MetricReports";
16 
17 inline std::string getDbusReportPath(const std::string& id)
18 {
19     std::string path =
20         "/xyz/openbmc_project/Telemetry/Reports/TelemetryService/" + id;
21     dbus::utility::escapePathForDbus(path);
22     return path;
23 }
24 
25 } // namespace telemetry
26 } // namespace redfish
27