Create Report and ReportManager interfaces
Both interfaces are created based on Telemetry design described in
openbmc/docs/designs/telemetry.md. Both will be implemented in
Telemetry service in openbmc/telemetry repository.
Ref:
https://github.com/openbmc/docs/blob/master/designs/telemetry.md
Tested:
- Successful build and verified changes in server.hpp and
server.cpp.
Change-Id: Id6578ce1d349ee07b8a07b2d597471ba7433a6c0
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
diff --git a/xyz/openbmc_project/Telemetry/Report.interface.yaml b/xyz/openbmc_project/Telemetry/Report.interface.yaml
new file mode 100644
index 0000000..5614890
--- /dev/null
+++ b/xyz/openbmc_project/Telemetry/Report.interface.yaml
@@ -0,0 +1,83 @@
+description: >
+ Implement this interface to provide report inspection features. An
+ implementation service should additionally implement
+ xyz.openbmc_project.Object.Delete for deletion of individual report objects.
+
+methods:
+ - name: Update
+ description: >
+ The Update method is defined for the on demand metric report update.
+ It triggers update of the Readings property. If ReportingType is not
+ set to OnRequest then method does nothing.
+
+properties:
+ - name: Persistency
+ type: boolean
+ description: >
+ Defines if the report configuration is stored in non volatile memory.
+ Configuration contains all Report properties excluding Readings.
+ - name: ReadingParameters
+ type: array[struct[array[object_path],enum[self.OperationType],string,string]]
+ description: >
+ Array of structure that contains list of sensor paths, operation type,
+ metric Id and metadata. Metric Id and metadata are used to store user
+ details, e.g. metadata can be used to map sensor name to DBus path.
+ - name: Readings
+ type: struct[uint64,array[struct[string,string,double,uint64]]]
+ description: >
+ Structure that contains timestamp of readings update in milliseconds and
+ array of metric Id, metadata, reading value and timestamp of single
+ reading update in milliseconds. Metric Id and metadata are equal to its
+ counterparts in ReadingParameters property.
+ flags:
+ - readonly
+ - name: EmitsReadingsUpdate
+ type: boolean
+ description: >
+ On Readings update PropertiesChanged signal is emitted. It allows to
+ decrease generation of load on DBus when Readings property is updated.
+ Redfish Event Service requires this option to be equal to true.
+ flags:
+ - const
+ - name: LogToMetricReportsCollection
+ type: boolean
+ description: >
+ Presence of Report in Metric Report Collection in Redfish Telemetry
+ Service.
+ flags:
+ - const
+ - name: ReportingType
+ type: enum[self.ReportingType]
+ description: Defines how readings are updated.
+ - name: Interval
+ type: uint64
+ description: >
+ Defines period of time in milliseconds when readings are updated.
+
+enumerations:
+ - name: OperationType
+ descritpion: Type of action that is executed on readings.
+ values:
+ - name: Single
+ description: Store a single reading, only allowed on single sensor.
+ - name: Max
+ description: Store maximal reading during defined time period.
+ - name: Min
+ description: Store minimal reading during defined time period.
+ - name: Avg
+ description: Calulate average of readings during defined time period.
+ - name: Sum
+ description: Calulate sum of readings over defined time period.
+ - name: ReportingType
+ description: >
+ The type that defines when Readings are updated.
+ values:
+ - name: OnChange
+ description: >
+ On sensor reading change.
+ - name: OnRequest
+ description: >
+ On Update method call.
+ - name: Periodic
+ description: >
+ After period of time defined by ScanPeriod property.
diff --git a/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml b/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml
new file mode 100644
index 0000000..05a6464
--- /dev/null
+++ b/xyz/openbmc_project/Telemetry/ReportManager.interface.yaml
@@ -0,0 +1,65 @@
+description: >
+ Implement to provide reports management. Contain information about report
+ limitations and allows to add report.
+
+methods:
+ - name: AddReport
+ 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: name
+ 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: emitsReadingsUpdate
+ type: boolean
+ description: >
+ Defines presence of PropertiesChanged signal for
+ xyz.openbmc_project.Telmetry.Report.Readings property.
+ - name: logToMetricReportsCollection
+ type: boolean
+ 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.
+ - name: metricParams
+ type: array[struct[array[object_path],enum[xyz.openbmc_project.Telemetry.Report.OperationType],string,string]]
+ description: >
+ Array of metric parameters where first parameter is an array of
+ sensors DBus paths. Second parameter specifies operation type of
+ metric. Third parameter is a metric Id and fourth parameter is a
+ metadata, both are used to store user details.
+ returns:
+ - name: reportPath
+ type: object_path
+ description: >
+ Path to new report -> /xyz/openbmc_project/Telemetry/Reports/{name}.
+
+properties:
+ - name: MaxReports
+ type: size
+ description: >
+ Contains the max number of metric reports supported by the Telemetry.
+ This property is added to be compliant with the Redfish Telemetry
+ Service schema, that contains MaxReports property.
+ flags:
+ - const
+ - name: MinInterval
+ type: uint64
+ description: >
+ Minimal allowed time between readings property updates. It limits
+ Interval property in xyz.openbmc_project.Telemetry.Report and
+ interval parameter in AddReport method.
+ flags:
+ - const