Break apart trigger interface
Having this large type creates confusion for translation. Splitting
this parameter into two fields allows us to remove the variant property
altogether, and allows splitting the rules for each type into their own
description.
The only users of this are bmcweb and telemetry, both of which have
patches up to effect this change under the same topic. Testing in those
patches.
Change-Id: I51a1dd3fe0619aa7a75f92764875552feda01a92
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml b/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml
index 5b6515f..10a3d5f 100644
--- a/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml
+++ b/yaml/xyz/openbmc_project/Telemetry/Trigger.interface.yaml
@@ -33,16 +33,19 @@
used as map's key. Its value is a metadata that is used to store user
data about sensor. In Redfish, metadata will be set to endpoint
corresponding to that sensor.
- - name: Thresholds
- type: variant[array[struct[enum[self.Type],uint64,enum[self.Direction],double]],array[struct[string,enum[self.Severity],uint64,string]]]
+ - name: numericThresholds
+ type: array[struct[enum[self.Type],uint64,enum[self.Direction],double]]
description: >
- First type in variant is a collection of numeric thresholds that has
- following fields - type, dwell time, direction and threshold value.
- Second type holded by variant is a collection of discrete thresholds
- that contains following fields - user id, severity, dwell time and
- threshold 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
+ A collection of numeric thresholds that has following fields - type,
+ dwell time, direction and threshold value. Array is limited by Type
+ enumeration, only 4 elements are allowed. Dwell time specifies for how
+ long condition has to persist to trigger an action.
+ - name: discreteThresholds
+ type: array[struct[string,enum[self.Severity],uint64,string]]
+ description: >
+ A collection of discrete thresholds that contains following fields -
+ user id, severity, dwell time and threshold value. Discrete value does
+ not need to be a number. Array size is not limited. If discrete
threshold array is empty then every value change is taken into account
of threshold condition. Dwell time specifies for how long condition
has to persist to trigger an action.
diff --git a/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml b/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml
index b6965fa..2e5d9fe 100644
--- a/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml
+++ b/yaml/xyz/openbmc_project/Telemetry/TriggerManager.interface.yaml
@@ -38,11 +38,16 @@
Collection of report names that are updated when threshold
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],uint64,enum[xyz.openbmc_project.Telemetry.Trigger.Direction],double]],array[struct[string,enum[xyz.openbmc_project.Telemetry.Trigger.Severity],uint64,string]]]
+ - name: numericThresholds
+ type: array[struct[enum[xyz.openbmc_project.Telemetry.Trigger.Type],uint64,enum[xyz.openbmc_project.Telemetry.Trigger.Direction],double]]
description: >
- Contains array of numeric or discrete thresholds that are
- described in xyz.openbmc_project.Telemetry.Trigger interface.
+ Contains array of numeric thresholds that are described in
+ xyz.openbmc_project.Telemetry.Trigger interface.
+ - name: discreteThresholds
+ type: array[struct[string,enum[xyz.openbmc_project.Telemetry.Trigger.Severity],uint64,string]]
+ description: >
+ Contains array of discrete thresholds that are described in
+ xyz.openbmc_project.Telemetry.Trigger interface.
returns:
- name: triggerPath
type: object_path