summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreportnov <eportnov@ibs.ru>2022-07-15 18:12:04 +0300
committereportnov <eportnov@ibs.ru>2022-07-18 10:27:18 +0300
commitff5831df9d6f272c255fdbf3d60ebc82bc7cb338 (patch)
tree626d448979c35ee483bf4cdc69f8c8dd52260749
parent2798ccb278a52fc54e19074dd3dabd16976e4635 (diff)
downloadopenbmc-feature/add_telemetry.tar.xz
Add configured telemetryfeature/add_telemetry
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0038-repair_telemetry_yaml.patch156
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend1
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/0001-set_new_report_path.patch22
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/30173616021
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry_%.bbappend8
5 files changed, 188 insertions, 0 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0038-repair_telemetry_yaml.patch b/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0038-repair_telemetry_yaml.patch
new file mode 100644
index 0000000000..de4c35abbc
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0038-repair_telemetry_yaml.patch
@@ -0,0 +1,156 @@
+From 34d6bfbcdea771bbfa957fe72f9e3070ccec4202 Mon Sep 17 00:00:00 2001
+From: eportnov <eportnov@ibs.ru>
+Date: Fri, 15 Jul 2022 17:27:25 +0300
+Subject: [PATCH] repair_telemetry_yaml
+
+---
+ .../Telemetry/ReportManager.interface.yaml | 111 +++++++++++++++---
+ 1 file changed, 95 insertions(+), 16 deletions(-)
+
+diff --git a/yaml/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml b/yaml/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml
+index ae8d36f..decc3d0 100644
+--- a/yaml/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml
++++ b/yaml/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml
+@@ -10,21 +10,19 @@ methods:
+ /xyz/openbmc_project/Telemetry/Reports/{Domain}/{Name} where
+ Domain and Name are parameters of this method.
+ parameters:
+- - name: name
++ - name: reportId
+ type: string
+ description: >
+ Defines the name of report to be exposed over D-Bus. Service allows
+ to use separator '/' in name to group reports in directory.
+ - name: reportingType
+- type: enum[xyz.openbmc_project.Telemetry.Report.ReportingType]
+- description: Defines report type
+- - name: reportUpdates
+- type: enum[xyz.openbmc_project.Telemetry.Report.ReportUpdates]
+- description: Defines report update type
+- - name: appendLimit
+- type: size
++ type: string
+ description: >
+- Defines the maximum number of entries in 'Readings' property.
++ Defines report type
++ Variants:
++ - Periodic
++ - OnRequest
++ - OnChange
+ - name: emitsReadingsUpdate
+ type: boolean
+ description: >
+@@ -35,25 +33,106 @@ methods:
+ description: >
+ Defines presence of Report in Metric Report Collection in Redfish
+ Telemetry Service.
++ - name: interval
++ type: uint64
++ description: >
++ Defines period of time in milliseconds when Report is updated with
++ new readings. Minimal interval is defined in MinInterval property(default: 1000).
++ - name: metricParams
++ type: array[struct[object_path,string,string,string]]
++ description: >
++ Array of struct of metric parameters where:
++ - first parameter is an array of DBus
++ sensor paths(example /xyz/openbmc_project/sensors/voltage/PVCCIN_CPU1);
++ - second parameter specifies operation type.
++ Variants:
++ -- Maximum
++ -- Minimum
++ -- Average
++ -- Summation
++ - third is a metric Id (store by a user)
++ - fourth is a metadata (store by a user)
++ returns:
++ - name: reportPath
++ type: object_path
++ description: >
++ Path to new report -> /xyz/openbmc_project/Telemetry/Reports/{name}.
++
++ - name: AddReportFutureVersion
++ description: >
++ Create new object that represent Report with
++ xyz.openbmc_project.Telemetry.Report interface stored in path
++ /xyz/openbmc_project/Telemetry/Reports/{Domain}/{Name} where
++ Domain and Name are parameters of this method.
++ parameters:
++ - name: reportId
++ type: string
++ description: >
++ Defines the name of report to be exposed over D-Bus. Service allows
++ to use separator '/' in name to group reports in directory.
++ - name: reportName
++ type: string
++ description: >
++ Defines the name of report to be exposed over D-Bus. Service allows
++ to use separator '/' in name to group reports in directory.
++ - name: reportingType
++ type: string
++ description: >
++ Defines report type
++ Variants:
++ - Periodic
++ - OnRequest
++ - OnChange
++ - name: reportUpdates
++ type: string
++ description: >
++ Defines report updates
++ Variants:
++ - Overwrite
++ - AppendStopsWhenFull
++ - AppendWrapsWhenFull
++ - name: appendLimit
++ type: uint64
++ description: >
++ Defines limit of values
++ - name: reportActions
++ type: array[string]
++ description: >
++ Defines report actions
++ May add variants:
++ - EmitsReadingsUpdate
++ - LogToMetricReportsCollection
+ - name: interval
+ type: uint64
+ description: >
+ Defines period of time in milliseconds when Report is updated with
+ new readings. Minimal interval is defined in MinInterval property.
+ - name: metricParams
+- type: array[struct[array[object_path],enum[xyz.openbmc_project.Telemetry.Report.OperationType],string,string,enum[xyz.openbmc_project.Telemetry.Report.CollectionTimescope],uint64]]
++ type: array[struct[array[struct[object_path,string]],string,string,string,uint64]]
+ description: >
+- Array of metric parameters where first parameter is an array of DBus
+- sensor paths. Second parameter specifies operation type. Third is a
+- metric Id and fourth is a metadata, both are used to store user
+- details. Fifth and sixth are used for collection timescope and
+- collection duration.
++ Array of struct of metric parameters where:
++ - first parameter is an array of struct of:
++ -- DBus sensor paths
++ (example /xyz/openbmc_project/sensors/voltage/PVCCIN_CPU1);
++ -- metadata (store by a user);
++ - second parameter specifies operation type
++ Variants:
++ -- Maximum
++ -- Minimum
++ -- Average
++ -- Summation
++ - third is a metric Id (store by a user)
++ - fourth is a CollectionTimeScope
++ Variants:
++ -- Point;
++ -- Interval;
++ -- StartupInterval;
++ - fifth is a CollectionTimeScope period
+ returns:
+ - name: reportPath
+ type: object_path
+ description: >
+ Path to new report -> /xyz/openbmc_project/Telemetry/Reports/{name}.
+-
+ properties:
+ - name: MaxReports
+ type: size
diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index 999739997e..fa37528261 100644
--- a/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -23,4 +23,5 @@ SRC_URI += "file://0007-ipmi-set-BIOS-id.patch \
file://0036-add-fields.patch \
file://0003-Add-new-fields-to-cpu.patch \
file://0037-add-new-dimm-fields.patch \
+ file://0038-repair_telemetry_yaml.patch \
"
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/0001-set_new_report_path.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/0001-set_new_report_path.patch
new file mode 100644
index 0000000000..b59438bd28
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/0001-set_new_report_path.patch
@@ -0,0 +1,22 @@
+From 71ad04dd8ce0a31fe260626215d30bf0e58b255c Mon Sep 17 00:00:00 2001
+From: eportnov <eportnov@ibs.ru>
+Date: Fri, 15 Jul 2022 17:38:30 +0300
+Subject: [PATCH] set_new_report_path
+
+---
+ src/report.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/report.hpp b/src/report.hpp
+index 6d8c6b4..8d71bc9 100644
+--- a/src/report.hpp
++++ b/src/report.hpp
+@@ -137,7 +137,7 @@ class Report : public interfaces::Report, public interfaces::MetricListener
+ static constexpr const char* reportIfaceName =
+ "xyz.openbmc_project.Telemetry.Report";
+ static constexpr const char* reportDir =
+- "/xyz/openbmc_project/Telemetry/Reports/";
++ "/xyz/openbmc_project/Telemetry/Reports/TelemetryService/";
+ static constexpr const char* deleteIfaceName =
+ "xyz.openbmc_project.Object.Delete";
+ static constexpr size_t reportVersion = 6;
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/3017361602 b/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/3017361602
new file mode 100644
index 0000000000..57252a3388
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry/3017361602
@@ -0,0 +1 @@
+{"AppendLimit":20,"Enabled":true,"Id":"report_id","Interval":1000,"Name":"report_name","ReadingParameters":[{"collectionDuration":10,"collectionTimeScope":0,"id":"id","operationType":2,"sensorPath":[{"metadata":"meta_data","path":"/xyz/openbmc_project/sensors/voltage/PVCCIN_CPU1","service":"xyz.openbmc_project.ADCSensor"}]}],"ReportActions":[1],"ReportUpdates":2,"ReportingType":0,"Version":6} \ No newline at end of file
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry_%.bbappend
new file mode 100644
index 0000000000..ca45488936
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/telemetry/telemetry_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
+SRC_URI += "file://3017361602 \
+ file://0001-set_new_report_path.patch \
+ "
+do_install:append() {
+ install -d ${D}/var/lib/telemetry/Reports
+ cp ${WORKDIR}/3017361602 ${D}/var/lib/telemetry/Reports
+}