-
Notifications
You must be signed in to change notification settings - Fork 70
1110: Add support for MetricDefinition scheme #1088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ef5c93f
to
eb6bd29
Compare
af9c49b
to
374e9f0
Compare
Added MetricDefinition node to Redfish code. Now user is able to list all available metrics in OpenBMC that are supported by Telemetry service. Metrics are grouped by reading type. MetricDefinitions contains all physical sensors supported by redfish, algorithm iterates through all chassis and collects results for each node available in that chassis (Power, Thermal, Sensors). When BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM will be enabled by default (meson option redfish-new-powersubsystem-thermalsubsystem) it will be possible to optimize this algorithm to only get sensors from Sensors node. Currently Sensors node doesn't contain all available sensors. Removal of ResourceNotFound in sensors.hpp to fix MetricDefinition Collection REST Get call. Tested: - MetricDefinitions response is filled with existing sensors, it works with and without Telemetry service - Validated a presence of MetricDefinition members and its attributes - Successfully passed RedfishServiceValidator.py using witherspoon image on QEMU - Tested using following GET,POST requests GET /redfish/v1/TelemetryService/MetricDefinitions { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions", "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection", "Members": [ { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Pwm" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostCpuUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostMemoryBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostPciBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Inlet_BRD_Temp" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Left_Rear_Board_Temp" } ], "Members@odata.count": 7, "Name": "Metric Definition Collection" } GET /redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach", "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition", "Id": "Fan_Tach", "IsLinear": true, "MaxReadingRange": 25000.0, "MetricDataType": "Decimal", "MetricProperties": [ "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/0/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/2/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/3/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/4/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/5/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/6/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/7/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/8/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/9/Reading" ], "MetricType": "Gauge", "MinReadingRange": 0.0, "Name": "Fan_Tach", "Units": "RPM" } POST redfish/v1/TelemetryService/MetricReportDefinitions, body: { "Id": "TestReport", "Metrics": [ { "MetricId": "TestMetric", "MetricProperties": [ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", ] } ], "MetricReportDefinitionType": "OnRequest", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ] } { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The resource has been created successfully", "MessageArgs": [], "MessageId": "Base.1.8.1.Created", "MessageSeverity": "OK", "Resolution": "None" } ] } Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 Signed-off-by: Ali Ahmed <ama213000@gmail.com>
374e9f0
to
7447d5d
Compare
@rfrandse Can you add the upstream commit here? |
}, | ||
"xyz.openbmc_project.ObjectMapper", | ||
"/xyz/openbmc_project/object_mapper", | ||
"xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it better to use dbus::utility::getSubTreePaths()
?
dbus::utility::getSubTreePaths(
"/xyz/openbmc_project/inventory", 0, interfaces,
[ccallback = std::forward<F>(cb)](const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreePathsResponse&
chassisPaths)
{
...
}
@@ -0,0 +1,58 @@ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it seems better to merge get_chass_names.hpp
into redfish-core/include/utils/chassis_utils.hpp
inline void getReadingRange( | ||
const std::string& service2, const std::string& path, | ||
const std::string& property, | ||
std::function<void(boost::system::error_code, double)> callback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be std::function<void(boost::system::error_code, double)>&& callback
?
{ | ||
crow::connections::systemBus->async_method_call( | ||
[callback = std::move(callback)]( | ||
boost::system::error_code ec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const boost::system::error_code& ec
}, | ||
"xyz.openbmc_project.ObjectMapper", | ||
"/xyz/openbmc_project/object_mapper", | ||
"xyz.openbmc_project.ObjectMapper", "GetSubTree", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dbus::utility::getSubTree()
can be a better choice
return item.first == sensorObjectPath.parent_path().filename(); | ||
}); | ||
|
||
const char* metricDefinitionPath = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to use string
and then we can can change L165 too.
std::string metricDefinitionPath =
"/redfish/v1/TelemetryService/MetricDefinitions/";
if (it != metricDefinitionMapping.end())
{
return metricDefinitionPath + it->second;
}
inline void mapRedfishUriToDbusPath(Callback&& callback) | ||
{ | ||
utils::getChassisNames([callback = std::forward<Callback>(callback)]( | ||
boost::system::error_code ec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const boost::system::error_code& ec,
const std::string& name) { | ||
telemetry::mapRedfishUriToDbusPath( | ||
[asyncResp, | ||
name](boost::system::error_code ec2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const boost::system::error_code& ec2
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { | ||
telemetry::mapRedfishUriToDbusPath( | ||
[asyncResp]( | ||
boost::system::error_code ec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const boost::system::error_code& ec,
8c2bdc3
to
cc830b4
Compare
cc830b4
to
8355b9f
Compare
edb3b58
to
16dae46
Compare
the original gerrit was abandoned and Jozef Wludzik comment when he abandoned was "Design of MetricDefinition requires a redefine. Abandon the change for that time" The current reason for keeping this in 1110 is to be consistent with how Telemetry was being used and presented in past releases 1020, 1030, 1040, 1050 and 1060. Without a better design to substitute need to keep this around for 1110 |
* Add support for MetricDefinition scheme Added MetricDefinition node to Redfish code. Now user is able to list all available metrics in OpenBMC that are supported by Telemetry service. Metrics are grouped by reading type. MetricDefinitions contains all physical sensors supported by redfish, algorithm iterates through all chassis and collects results for each node available in that chassis (Power, Thermal, Sensors). When BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM will be enabled by default (meson option redfish-new-powersubsystem-thermalsubsystem) it will be possible to optimize this algorithm to only get sensors from Sensors node. Currently Sensors node doesn't contain all available sensors. Removal of ResourceNotFound in sensors.hpp to fix MetricDefinition Collection REST Get call. Tested: - MetricDefinitions response is filled with existing sensors, it works with and without Telemetry service - Validated a presence of MetricDefinition members and its attributes - Successfully passed RedfishServiceValidator.py using witherspoon image on QEMU - Tested using following GET,POST requests GET /redfish/v1/TelemetryService/MetricDefinitions { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions", "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection", "Members": [ { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Pwm" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostCpuUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostMemoryBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostPciBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Inlet_BRD_Temp" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Left_Rear_Board_Temp" } ], "Members@odata.count": 7, "Name": "Metric Definition Collection" } GET /redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach", "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition", "Id": "Fan_Tach", "IsLinear": true, "MaxReadingRange": 25000.0, "MetricDataType": "Decimal", "MetricProperties": [ "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/0/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/2/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/3/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/4/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/5/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/6/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/7/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/8/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/9/Reading" ], "MetricType": "Gauge", "MinReadingRange": 0.0, "Name": "Fan_Tach", "Units": "RPM" } POST redfish/v1/TelemetryService/MetricReportDefinitions, body: { "Id": "TestReport", "Metrics": [ { "MetricId": "TestMetric", "MetricProperties": [ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", ] } ], "MetricReportDefinitionType": "OnRequest", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ] } { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The resource has been created successfully", "MessageArgs": [], "MessageId": "Base.1.8.1.Created", "MessageSeverity": "OK", "Resolution": "None" } ] } Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 Signed-off-by: Ali Ahmed <ama213000@gmail.com> * Review feedback changes * review updates 2 --------- Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Ali Ahmed <ama213000@gmail.com> Co-authored-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
…)" This reverts commit 31338dc. Reverting due to a rash of defects in this area: 682422, 682838, 684542, 682505. This endpoint is used to get the supported Metric Definitions (sensors), the Metric Definitions are like the available materials for the blueprint (the blueprint would be the Metric Report Definitions) and the house/finished product would be the Metric Reports. The HMC is calling this endpoint several at a time and the BMC is timing out. The BMC journal is filled with: Feb 24 08:21:25 xxx bmcweb[14780]: [ERROR sensors.hpp:420] getChassis respHandler DBUS error: Connection timed out [generic:110] Upstream we don't support this. This API takes 2 seconds to complete and is very resource intensive. The Sensor API /redfish/v1/Chassis/chassis/Sensors can be used to create the telemetry Metric Report Definitions.
* Add support for MetricDefinition scheme Added MetricDefinition node to Redfish code. Now user is able to list all available metrics in OpenBMC that are supported by Telemetry service. Metrics are grouped by reading type. MetricDefinitions contains all physical sensors supported by redfish, algorithm iterates through all chassis and collects results for each node available in that chassis (Power, Thermal, Sensors). When BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM will be enabled by default (meson option redfish-new-powersubsystem-thermalsubsystem) it will be possible to optimize this algorithm to only get sensors from Sensors node. Currently Sensors node doesn't contain all available sensors. Removal of ResourceNotFound in sensors.hpp to fix MetricDefinition Collection REST Get call. Tested: - MetricDefinitions response is filled with existing sensors, it works with and without Telemetry service - Validated a presence of MetricDefinition members and its attributes - Successfully passed RedfishServiceValidator.py using witherspoon image on QEMU - Tested using following GET,POST requests GET /redfish/v1/TelemetryService/MetricDefinitions { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions", "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection", "Members": [ { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Pwm" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostCpuUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostMemoryBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostPciBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Inlet_BRD_Temp" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Left_Rear_Board_Temp" } ], "Members@odata.count": 7, "Name": "Metric Definition Collection" } GET /redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach", "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition", "Id": "Fan_Tach", "IsLinear": true, "MaxReadingRange": 25000.0, "MetricDataType": "Decimal", "MetricProperties": [ "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/0/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/2/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/3/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/4/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/5/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/6/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/7/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/8/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/9/Reading" ], "MetricType": "Gauge", "MinReadingRange": 0.0, "Name": "Fan_Tach", "Units": "RPM" } POST redfish/v1/TelemetryService/MetricReportDefinitions, body: { "Id": "TestReport", "Metrics": [ { "MetricId": "TestMetric", "MetricProperties": [ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", ] } ], "MetricReportDefinitionType": "OnRequest", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ] } { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The resource has been created successfully", "MessageArgs": [], "MessageId": "Base.1.8.1.Created", "MessageSeverity": "OK", "Resolution": "None" } ] } Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 Signed-off-by: Ali Ahmed <ama213000@gmail.com> * Review feedback changes * review updates 2 --------- Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Ali Ahmed <ama213000@gmail.com> Co-authored-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
* Add support for MetricDefinition scheme Added MetricDefinition node to Redfish code. Now user is able to list all available metrics in OpenBMC that are supported by Telemetry service. Metrics are grouped by reading type. MetricDefinitions contains all physical sensors supported by redfish, algorithm iterates through all chassis and collects results for each node available in that chassis (Power, Thermal, Sensors). When BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM will be enabled by default (meson option redfish-new-powersubsystem-thermalsubsystem) it will be possible to optimize this algorithm to only get sensors from Sensors node. Currently Sensors node doesn't contain all available sensors. Removal of ResourceNotFound in sensors.hpp to fix MetricDefinition Collection REST Get call. Tested: - MetricDefinitions response is filled with existing sensors, it works with and without Telemetry service - Validated a presence of MetricDefinition members and its attributes - Successfully passed RedfishServiceValidator.py using witherspoon image on QEMU - Tested using following GET,POST requests GET /redfish/v1/TelemetryService/MetricDefinitions { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions", "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection", "Members": [ { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Pwm" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostCpuUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostMemoryBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostPciBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Inlet_BRD_Temp" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Left_Rear_Board_Temp" } ], "Members@odata.count": 7, "Name": "Metric Definition Collection" } GET /redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach", "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition", "Id": "Fan_Tach", "IsLinear": true, "MaxReadingRange": 25000.0, "MetricDataType": "Decimal", "MetricProperties": [ "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/0/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/2/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/3/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/4/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/5/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/6/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/7/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/8/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/9/Reading" ], "MetricType": "Gauge", "MinReadingRange": 0.0, "Name": "Fan_Tach", "Units": "RPM" } POST redfish/v1/TelemetryService/MetricReportDefinitions, body: { "Id": "TestReport", "Metrics": [ { "MetricId": "TestMetric", "MetricProperties": [ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", ] } ], "MetricReportDefinitionType": "OnRequest", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ] } { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The resource has been created successfully", "MessageArgs": [], "MessageId": "Base.1.8.1.Created", "MessageSeverity": "OK", "Resolution": "None" } ] } Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 Signed-off-by: Ali Ahmed <ama213000@gmail.com> * Review feedback changes * review updates 2 --------- Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Ali Ahmed <ama213000@gmail.com> Co-authored-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
* Add support for MetricDefinition scheme Added MetricDefinition node to Redfish code. Now user is able to list all available metrics in OpenBMC that are supported by Telemetry service. Metrics are grouped by reading type. MetricDefinitions contains all physical sensors supported by redfish, algorithm iterates through all chassis and collects results for each node available in that chassis (Power, Thermal, Sensors). When BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM will be enabled by default (meson option redfish-new-powersubsystem-thermalsubsystem) it will be possible to optimize this algorithm to only get sensors from Sensors node. Currently Sensors node doesn't contain all available sensors. Removal of ResourceNotFound in sensors.hpp to fix MetricDefinition Collection REST Get call. Tested: - MetricDefinitions response is filled with existing sensors, it works with and without Telemetry service - Validated a presence of MetricDefinition members and its attributes - Successfully passed RedfishServiceValidator.py using witherspoon image on QEMU - Tested using following GET,POST requests GET /redfish/v1/TelemetryService/MetricDefinitions { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions", "@odata.type": "#MetricDefinitionCollection.MetricDefinitionCollection", "Members": [ { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Pwm" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostCpuUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostMemoryBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/HostPciBandwidthUtilization" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Inlet_BRD_Temp" }, { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Left_Rear_Board_Temp" } ], "Members@odata.count": 7, "Name": "Metric Definition Collection" } GET /redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach { "@odata.id": "/redfish/v1/TelemetryService/MetricDefinitions/Fan_Tach", "@odata.type": "#MetricDefinition.v1_0_3.MetricDefinition", "Id": "Fan_Tach", "IsLinear": true, "MaxReadingRange": 25000.0, "MetricDataType": "Decimal", "MetricProperties": [ "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/0/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/1/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/2/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/3/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/4/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/5/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/6/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/7/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/8/Reading", "/redfish/v1/Chassis/AC_Baseboard/Thermal#/Fans/9/Reading" ], "MetricType": "Gauge", "MinReadingRange": 0.0, "Name": "Fan_Tach", "Units": "RPM" } POST redfish/v1/TelemetryService/MetricReportDefinitions, body: { "Id": "TestReport", "Metrics": [ { "MetricId": "TestMetric", "MetricProperties": [ "/redfish/v1/Chassis/Chassis0/Thermal#/Fans/3/Reading", ] } ], "MetricReportDefinitionType": "OnRequest", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ] } { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The resource has been created successfully", "MessageArgs": [], "MessageId": "Base.1.8.1.Created", "MessageSeverity": "OK", "Resolution": "None" } ] } Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00 Signed-off-by: Ali Ahmed <ama213000@gmail.com> * Review feedback changes * review updates 2 --------- Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Ali Ahmed <ama213000@gmail.com> Co-authored-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Add support for MetricDefinition scheme