Update Telemetry Trigger and TriggerManager
For Trigger interface:
- Removed LogToJournal, LogToRedfish and UpdateReport properties.
- Added TriggerActions property which is an array of TriggerAction enum.
- Defined TriggerAction enum: LogToLogService, RedfishEvent,
UpdateReport. Those values correspond to removed properties.
- Modified Thresholds property to reflect current telemetry
implementation.
For TriggerManager interface:
- Removed 'discrete' param from AddTrigger method. This can be deduced
by service.
- Removed 'logToJournal', 'logToRedfish' and 'updateReport' params from
AddTrigger method.
- Added 'triggerActions' param to AddTrigger method, which contains
values corresponding to removed params.
- Modified 'thresholds' param in AddTrigger method to reflect current
telemetry implementation.
By replacing bool properties/params with single array, trigger interface
will be easier to implement in Redfish.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I995ba8272c633054106c76fefaa38df87384f64d
diff --git a/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml b/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml
index 268c53e..bb6fd4d 100644
--- a/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml
+++ b/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml
@@ -1,6 +1,6 @@
description: >
Implement this interface to provide trigger inspection features. An
- implementation service should additionaly implement
+ implementation service should additionally implement
xyz.openbmc_project.Object.Delete for deletion of individual trigger.
properties:
@@ -11,26 +11,10 @@
Otherwise numeric thresholds is used.
flags:
- const
- - name: LogToJournal
- type: boolean
+ - name: TriggerActions
+ type: array[enum[self.TriggerAction]]
description: >
- Defines if trigger logs to system journal when threshold conditions are
- met. LogToJournal is a trigger action.
- flags:
- - const
- - name: LogToRedfish
- type: boolean
- description: >
- Defines if trigger logs Redfish message when threshold conditions are
- met. LogToRedfish is a trigger action.
- flags:
- - const
- - name: UpdateReport
- type: boolean
- description: >
- Defines if trigger updates report when threshold conditions are
- met. Reports that will be updated are specified in ReportNames property.
- UpdateReport is a trigger action.
+ Defines actions which are taken when threshold conditions are met.
flags:
- const
- name: Persistent
@@ -40,7 +24,8 @@
type: array[string]
description: >
Collection of report names that are updated when threshold conditions
- are met. List is ignored if UpdateReport property is false.
+ are met. List is ignored if TriggerActions property does not contain
+ 'UpdateReport' action.
- name: Sensors
type: array[struct[object_path, string]]
description: >
@@ -48,19 +33,32 @@
structure is a sensor path. Second parameter is a metadata that is used
to store user data about sensor.
- name: Thresholds
- type: variant[array[struct[enum[self.Type],enum[self.Direction],uint64,double]],array[struct[string,enum[self.Severity],uint64,double]]]
+ type: variant[array[struct[enum[self.Type],uint64,enum[self.Direction],double]],array[struct[string,enum[self.Severity],uint64,string]]]
description: >
First type in variant is a collection of numeric thresholds that has
- following fields - type, direction, dwell time and threshold value.
+ following fields - type, dwell time, direction and threshold value.
Second type holds by variant is a collection of discrete thresholds that
contains following fields - user id, severity, dwell time and threshold
- value. Numeric threshold array is limited by Type enumeration, only 4
- elements are allowed. Discrete threshold array size is not limited. If
- Discrete threshold array is empty than every value change is taken into
- account of threshold condition. Dwell time specify for how long
- condition has to persist to trigger an action.
+ value. Discrete value does not need to be a number. Numeric threshold
+ array is limited by Type enumeration, only 4 elements are allowed.
+ Discrete threshold array size is not limited. If discrete threshold
+ array is empty than every value change is taken into account of
+ threshold condition. Dwell time specify for how long condition has to
+ persist to trigger an action.
enumerations:
+ - name: TriggerAction
+ description: >
+ Defines a action which is taken once threshold condition is met.
+ values:
+ - name: LogToLogService
+ description: Trigger will log to journal.
+ - name: RedfishEvent
+ description: Trigger will log Redfish message.
+ - name: UpdateReport
+ description: >
+ Trigger will update reports. Reports that will be updated are
+ specified in ReportNames property.
- name: Type
description: >
Defines a context of a message that is logged when numeric threshold
diff --git a/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml b/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml
index e6b1e7e..a384ab0 100644
--- a/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml
+++ b/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml
@@ -14,26 +14,10 @@
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: discrete
- type: boolean
+ - name: triggerActions
+ type: array[enum[xyz.openbmc_project.Telemetry.Trigger.TriggerAction]]
description: >
- Defines if thresholds parameter contains discrete thresholds.
- Otherwise thresholds contain numeric thresholds.
- - name: logToJournal
- type: boolean
- description: >
- Defines if trigger logs to system journal when threshold conditions
- are met.
- - name: logToRedfish
- type: boolean
- description: >
- Defines if trigger logs Redfish message when threshold conditions
- are met.
- - name: updateReport
- type: boolean
- description: >
- Defines if trigger updates reports that are specified in reportNames
- parameter when threshold conditions are met.
+ Defines which actions are taken when threshold conditions are met.
- name: sensors
type: array[struct[object_path,string]]
description: >
@@ -44,10 +28,10 @@
type: array[string]
description: >
Collection of report names that are updated when threshold
- conditions are met. This parameter is ignored if updateReport
- parameter is set to false.
+ conditions are met. This parameter is ignored if triggerActions
+ parameter does not contain 'UpdateReport' action.
- name: thresholds
- type: variant[array[struct[enum[xyz.openbmc_project.Telemetry.Trigger.Type],enum[xyz.openbmc_project.Telemetry.Trigger.Direction],uint64,double]],array[struct[string,enum[xyz.openbmc_project.Telemetry.Trigger.Severity],uint64,double]]]
+ type: variant[array[struct[enum[xyz.openbmc_project.Telemetry.Trigger.Type],uint64,enum[xyz.openbmc_project.Telemetry.Trigger.Direction],double]],array[struct[string,enum[xyz.openbmc_project.Telemetry.Trigger.Severity],uint64,string]]]
description: >
Contains array of numeric or discrete thresholds that are described
in xyz.openbmc_project.Telemetry.Trigger interface.