summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2021-03-09 01:14:22 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2021-03-09 02:20:11 +0300
commit0cfc19e6565d8e3a1aa563c59edb347f9128026f (patch)
tree7146561723137e206a983483b06466d7ab5a9e2a /meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry
parent930df2e58b9725756edbccf99fd4979026fc28fd (diff)
downloadopenbmc-0cfc19e6565d8e3a1aa563c59edb347f9128026f.tar.xz
Update to internal 0.35
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch12
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch69
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch12
4 files changed, 46 insertions, 71 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch
index b1334a420..208831338 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0001-Redfish-TelemetryService-schema-implementation.patch
@@ -1,7 +1,7 @@
-From c7fce288802ece4a6e1ff71ee060a44e0b8fe992 Mon Sep 17 00:00:00 2001
+From d50e4ce193703c008d3293acd03e1c0542c0c215 Mon Sep 17 00:00:00 2001
From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
Date: Mon, 27 Apr 2020 17:24:15 +0200
-Subject: [PATCH 1/4] Redfish TelemetryService schema implementation
+Subject: [PATCH] Redfish TelemetryService schema implementation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -30,13 +30,13 @@ Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: Ie6b0b49f4ef5eeaef07d1209b6c349270c04d570
---
- redfish-core/include/redfish.hpp | 10 ++
- redfish-core/include/utils/telemetry_utils.hpp | 71 ++++++++++
- redfish-core/include/utils/time_utils.hpp | 78 +++++++++++
- redfish-core/lib/metric_report.hpp | 162 +++++++++++++++++++++
- redfish-core/lib/metric_report_definition.hpp | 186 +++++++++++++++++++++++++
- redfish-core/lib/service_root.hpp | 2 +
- redfish-core/lib/telemetry_service.hpp | 93 +++++++++++++
+ redfish-core/include/redfish.hpp | 10 +
+ .../include/utils/telemetry_utils.hpp | 71 +++++++
+ redfish-core/include/utils/time_utils.hpp | 78 ++++++++
+ redfish-core/lib/metric_report.hpp | 162 +++++++++++++++
+ redfish-core/lib/metric_report_definition.hpp | 186 ++++++++++++++++++
+ redfish-core/lib/service_root.hpp | 2 +
+ redfish-core/lib/telemetry_service.hpp | 93 +++++++++
7 files changed, 602 insertions(+)
create mode 100644 redfish-core/include/utils/telemetry_utils.hpp
create mode 100644 redfish-core/include/utils/time_utils.hpp
@@ -45,7 +45,7 @@ Change-Id: Ie6b0b49f4ef5eeaef07d1209b6c349270c04d570
create mode 100644 redfish-core/lib/telemetry_service.hpp
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
-index 54d5d0e..2587b37 100644
+index dabf78e..b366e24 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -25,6 +25,8 @@
@@ -65,7 +65,7 @@ index 54d5d0e..2587b37 100644
#include "../lib/thermal.hpp"
#include "../lib/update_service.hpp"
#ifdef BMCWEB_ENABLE_VM_NBDPROXY
-@@ -207,6 +210,13 @@ class RedfishService
+@@ -212,6 +215,13 @@ class RedfishService
nodes.emplace_back(std::make_unique<HypervisorInterface>(app));
nodes.emplace_back(std::make_unique<HypervisorSystem>(app));
@@ -713,5 +713,5 @@ index 0000000..a6acc34
+};
+} // namespace redfish
--
-2.16.6
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch
index b04a72c9f..f40058ad8 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0002-Add-POST-and-DELETE-in-MetricReportDefinitions.patch
@@ -1,7 +1,7 @@
-From 0784af276b72e5df9c545d83bc989833ac2935c4 Mon Sep 17 00:00:00 2001
+From 433358330c7f7d2fba99f6e488d67b314224317f Mon Sep 17 00:00:00 2001
From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
Date: Mon, 18 May 2020 11:56:57 +0200
-Subject: [PATCH 2/4] Add POST and DELETE in MetricReportDefinitions
+Subject: [PATCH] Add POST and DELETE in MetricReportDefinitions
Added POST action in MetricReportDefinitions node to allow user
to add new MetricReportDefinition. Using minimal set of
@@ -24,9 +24,9 @@ Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I2fed96848594451e22fde686f8c066d7770cc65a
---
- redfish-core/include/utils/telemetry_utils.hpp | 5 +-
- redfish-core/include/utils/time_utils.hpp | 145 +++++++++-
- redfish-core/lib/metric_report_definition.hpp | 382 ++++++++++++++++++++++++-
+ .../include/utils/telemetry_utils.hpp | 5 +-
+ redfish-core/include/utils/time_utils.hpp | 145 ++++++-
+ redfish-core/lib/metric_report_definition.hpp | 382 +++++++++++++++++-
3 files changed, 516 insertions(+), 16 deletions(-)
diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
@@ -679,5 +679,5 @@ index 48c56e6..d5a540d 100644
"#MetricReportDefinition.v1_3_0.MetricReportDefinition";
};
--
-2.16.6
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch
index d81d654f1..7c3e4c804 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0003-Add-support-for-MetricDefinition-scheme.patch
@@ -1,7 +1,7 @@
-From b074a84560349fdbd46604ab0b8c75804de09fef Mon Sep 17 00:00:00 2001
+From d9016c8064f5732fb6d24d07a990ddfa294a8a9d Mon Sep 17 00:00:00 2001
From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
Date: Mon, 8 Jun 2020 17:15:54 +0200
-Subject: [PATCH 3/4] Add support for MetricDefinition scheme
+Subject: [PATCH] Add support for MetricDefinition scheme
Added MetricDefinition node to redfish core. Now user is able to
get all possible metrics that are present in system and are
@@ -17,19 +17,19 @@ Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I3086e1302e1ba2e5442d1367939fd5507a0cbc00
---
- redfish-core/include/redfish.hpp | 3 +
- redfish-core/include/utils/telemetry_utils.hpp | 56 ++---
- redfish-core/lib/metric_definition.hpp | 269 +++++++++++++++++++++++++
- redfish-core/lib/metric_report_definition.hpp | 22 ++
- redfish-core/lib/power.hpp | 4 +-
- redfish-core/lib/sensors.hpp | 104 +++++++---
- redfish-core/lib/telemetry_service.hpp | 2 +
- redfish-core/lib/thermal.hpp | 4 +-
- 8 files changed, 410 insertions(+), 54 deletions(-)
+ redfish-core/include/redfish.hpp | 3 +
+ .../include/utils/telemetry_utils.hpp | 56 ++--
+ redfish-core/lib/metric_definition.hpp | 269 ++++++++++++++++++
+ redfish-core/lib/metric_report_definition.hpp | 22 ++
+ redfish-core/lib/power.hpp | 4 +-
+ redfish-core/lib/sensors.hpp | 96 +++++--
+ redfish-core/lib/telemetry_service.hpp | 2 +
+ redfish-core/lib/thermal.hpp | 4 +-
+ 8 files changed, 406 insertions(+), 50 deletions(-)
create mode 100644 redfish-core/lib/metric_definition.hpp
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
-index 2587b37..705f490 100644
+index b366e24..a938d43 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -25,6 +25,7 @@
@@ -40,7 +40,7 @@ index 2587b37..705f490 100644
#include "../lib/metric_report.hpp"
#include "../lib/metric_report_definition.hpp"
#include "../lib/network_protocol.hpp"
-@@ -211,6 +212,8 @@ class RedfishService
+@@ -216,6 +217,8 @@ class RedfishService
nodes.emplace_back(std::make_unique<HypervisorSystem>(app));
nodes.emplace_back(std::make_unique<TelemetryService>(app));
@@ -475,7 +475,7 @@ index 1c7a009..99c45ef 100644
std::optional<std::vector<nlohmann::json>> voltageCollections;
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
-index 567cb0c..363713d 100644
+index 14c9593..bf97540 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -54,9 +54,10 @@ static constexpr std::string_view thermal = "Thermal";
@@ -589,36 +589,11 @@ index 567cb0c..363713d 100644
const std::string chassisSubNode;
private:
-@@ -320,20 +380,20 @@ void getConnections(
- * made, and eliminate Power sensors when a Thermal request is made.
- */
- inline void reduceSensorList(
-- const std::shared_ptr<SensorsAsyncResp>& SensorsAsyncResp,
-+ const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp,
- const std::vector<std::string>* allSensors,
- const std::shared_ptr<boost::container::flat_set<std::string>>&
- activeSensors)
- {
-- if (SensorsAsyncResp == nullptr)
-+ if (sensorsAsyncResp == nullptr)
- {
- return;
- }
- if ((allSensors == nullptr) || (activeSensors == nullptr))
- {
- messages::resourceNotFound(
-- SensorsAsyncResp->res, SensorsAsyncResp->chassisSubNode,
-- SensorsAsyncResp->chassisSubNode == sensors::node::thermal
-+ sensorsAsyncResp->res, sensorsAsyncResp->chassisSubNode,
-+ sensorsAsyncResp->chassisSubNode == sensors::node::thermal
- ? "Temperatures"
- : "Voltages");
-
@@ -345,11 +405,11 @@ inline void reduceSensorList(
return;
}
-- for (const char* type : SensorsAsyncResp->types)
+- for (const char* type : sensorsAsyncResp->types)
+ for (const char* path : sensorsAsyncResp->matchPaths)
{
for (const std::string& sensor : *allSensors)
@@ -631,21 +606,21 @@ index 567cb0c..363713d 100644
@@ -853,18 +913,8 @@ inline void objectInterfacesToJson(
if (sensorsAsyncResp->chassisSubNode == sensors::node::sensors)
{
- sensor_json["@odata.type"] = "#Sensor.v1_0_0.Sensor";
+ sensorJson["@odata.type"] = "#Sensor.v1_0_0.Sensor";
- if (sensorType == "power")
- {
-- sensor_json["ReadingUnits"] = "Watts";
+- sensorJson["ReadingUnits"] = "Watts";
- }
- else if (sensorType == "current")
- {
-- sensor_json["ReadingUnits"] = "Amperes";
+- sensorJson["ReadingUnits"] = "Amperes";
- }
- else if (sensorType == "utilization")
- {
-- sensor_json["ReadingUnits"] = "Percent";
+- sensorJson["ReadingUnits"] = "Percent";
- }
-+ sensor_json["ReadingType"] = sensors::toReadingType(sensorType);
-+ sensor_json["ReadingUnits"] = sensors::toReadingUnits(sensorType);
++ sensorJson["ReadingType"] = sensors::toReadingType(sensorType);
++ sensorJson["ReadingUnits"] = sensors::toReadingUnits(sensorType);
}
else if (sensorType == "temperature")
{
@@ -705,5 +680,5 @@ index 8e01bee..00acdf9 100644
if (!json_util::readJson(req, asyncResp->res, "Temperatures",
--
-2.16.6
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch
index 08dcb385d..06c50b31f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/telemetry/0004-Sync-Telmetry-service-with-EventService.patch
@@ -1,7 +1,7 @@
-From 5b775e33221638a34c4aad0e2edeffc447d50fab Mon Sep 17 00:00:00 2001
+From b6286fe6800ca402b013e57429025fd9e4d65cab Mon Sep 17 00:00:00 2001
From: "Wludzik, Jozef" <jozef.wludzik@intel.com>
Date: Fri, 4 Dec 2020 14:48:41 +0100
-Subject: [PATCH 4/4] Sync Telmetry service with EventService
+Subject: [PATCH] Sync Telmetry service with EventService
Now assembling MetricReport is done properly and is
covered in one place - MetricReport node.
@@ -16,12 +16,12 @@ Tested:
Change-Id: I2fc1841a6c9259a8bff30b34bddc0d4aabd41912
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
---
- redfish-core/include/event_service_manager.hpp | 156 +++++++++----------------
- redfish-core/lib/metric_report.hpp | 35 +++---
+ .../include/event_service_manager.hpp | 156 ++++++------------
+ redfish-core/lib/metric_report.hpp | 35 ++--
2 files changed, 74 insertions(+), 117 deletions(-)
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
-index 54dafb4..1cdb9a6 100644
+index f68ae1d..893a813 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -14,6 +14,7 @@
@@ -326,5 +326,5 @@ index 050304c..c2013cc 100644
static constexpr const char* schemaType =
--
-2.16.6
+2.17.1