summaryrefslogtreecommitdiffstats
path: root/src/example/test.yaml
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-02-19 14:03:05 -0600
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-27 18:36:05 +0000
commit3c5318d843651dd18a6b8b0da67e3aaef810ca91 (patch)
tree7d842b08dc0d9324a9700c7b141edbb8c31448e7 /src/example/test.yaml
parent35e75f0a402dd5c5e7786674bf861800ab675e0f (diff)
downloadphosphor-dbus-monitor-3c5318d843651dd18a6b8b0da67e3aaef810ca91.tar.gz
phosphor-dbus-monitor-3c5318d843651dd18a6b8b0da67e3aaef810ca91.zip
Add ElogWithMetaDataCapture class
This callback class will create an error log with exactly 1 metadata field, which takes a string. This metadata field will be filled in with the property paths, names, and values of the properties that passed the condition checks that caused the callback to be called in the first place. Tested: Ran with YAML rules that used this callback and checked that everything worked as specified. Change-Id: Ib37206c63385939c583a09e7ba979d6e016691f6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'src/example/test.yaml')
-rw-r--r--src/example/test.yaml16
1 files changed, 16 insertions, 0 deletions
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