summaryrefslogtreecommitdiffstats
path: root/src/example
diff options
context:
space:
mode:
Diffstat (limited to 'src/example')
-rw-r--r--src/example/example.yaml24
-rw-r--r--src/example/test.yaml16
2 files changed, 40 insertions, 0 deletions
diff --git a/src/example/example.yaml b/src/example/example.yaml
index bfb1c62..ec0a611 100644
--- a/src/example/example.yaml
+++ b/src/example/example.yaml
@@ -99,6 +99,30 @@
value: testing...
type: string
+- name: example elog with metadata capture callback
+ description: >
+ 'Callbacks are actions pdm should take when instructed to do so.
+
+ This callback creates an elog, and it will capture the values of the
+ properties that passed its condition check in the metadata field
+ (that must be a string type) in the form:
+
+ |path1:property1=value1|path2:property2=value2|
+
+ Note that as this callback depends on the condition that called it to
+ fill in the result of its checks on each property, this callback should
+ use the same properties and paths keywords as the condition that calls it.
+
+ Currently an error log with only 1 metadata entry of type string is
+ supported.'
+
+ class: callback
+ callback: elog_with_metadata
+ paths: example path group
+ properties: example property group
+ error: xyz::openbmc_project::Common::Callout::Error::Inventory
+ metadata: xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH
+
- name: example event callback
description: >
'Callbacks are actions PDM should take when instructed to do so.
diff --git a/src/example/test.yaml b/src/example/test.yaml
index 6632891..b37ff72 100644
--- a/src/example/test.yaml
+++ b/src/example/test.yaml
@@ -278,6 +278,22 @@
properties: test string property group
error: xyz::openbmc_project::Common::Error::InternalFailure
+- name: test elog that captures the passing string metadata
+ class: callback
+ callback: elog_with_metadata
+ paths: test path group
+ properties: test string property group
+ error: xyz::openbmc_project::Common::Callout::Error::Inventory
+ metadata: xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH
+
+- name: test elog that captures the passing int64_t metadata
+ class: callback
+ callback: elog_with_metadata
+ paths: test path group
+ properties: test s64 property group
+ error: xyz::openbmc_project::Common::Callout::Error::Inventory
+ metadata: xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH
+
- name: test method
class: callback
callback: method
OpenPOWER on IntegriCloud