leak detector: add leak events
Add the leak events to be reported for liquid leak detector. Currently,
there is no standard redfish message registry for these events, hence
they are being added to OpenBMC namespace.
```
https://redfishforum.com/thread/1074/redfish-message-registry-leakdetection
```
Change-Id: Ibc88dc2ecf73c4cddcf35d80b2e960026d92dfa4
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/gen/xyz/openbmc_project/State/Leak/Detector/meson.build b/gen/xyz/openbmc_project/State/Leak/Detector/meson.build
new file mode 100644
index 0000000..741c5d2
--- /dev/null
+++ b/gen/xyz/openbmc_project/State/Leak/Detector/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/State/Leak/Detector__cpp'.underscorify(),
+ input: [ '../../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml', ],
+ output: [ 'event.cpp', 'event.hpp', ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../../../yaml',
+ 'xyz/openbmc_project/State/Leak/Detector',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/State/Leak/meson.build b/gen/xyz/openbmc_project/State/Leak/meson.build
new file mode 100644
index 0000000..681bddb
--- /dev/null
+++ b/gen/xyz/openbmc_project/State/Leak/meson.build
@@ -0,0 +1,16 @@
+# Generated file; do not modify.
+subdir('Detector')
+generated_others += custom_target(
+ 'xyz/openbmc_project/State/Leak/Detector__markdown'.underscorify(),
+ input: [ '../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml', ],
+ output: [ 'Detector.md' ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../../yaml',
+ 'xyz/openbmc_project/State/Leak/Detector',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/State/meson.build b/gen/xyz/openbmc_project/State/meson.build
index 2a818f6..c425d79 100644
--- a/gen/xyz/openbmc_project/State/meson.build
+++ b/gen/xyz/openbmc_project/State/meson.build
@@ -76,6 +76,7 @@
],
)
+subdir('Leak')
subdir('OperatingSystem')
subdir('PowerOnHours')
generated_others += custom_target(
diff --git a/yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml b/yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml
new file mode 100644
index 0000000..94a3485
--- /dev/null
+++ b/yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml
@@ -0,0 +1,45 @@
+version: 1.0.0
+
+errors:
+ - name: LeakDetectedCritical
+ severity: critical
+ metadata:
+ - name: DetectorName
+ type: object_path
+ primary: true
+ description: The name or identifier of the leak detector.
+ en:
+ description: A critical level liquid leak has been detected.
+ message:
+ A liquid leak has been detected at a critical level by
+ {DetectorName}.
+ resolution: Inspect the resource for leak.
+ errno: EPIPE
+
+ - name: LeakDetectedWarning
+ severity: warning
+ metadata:
+ - name: DetectorName
+ type: object_path
+ primary: true
+ description: The name or identifier of the leak detector.
+ en:
+ description: A warning level liquid leak has been detected.
+ message:
+ A liquid leak has been detected at a warning level by
+ {DetectorName}.
+ resolution: Inspect the resource for leak.
+ errno: EPIPE
+
+events:
+ - name: LeakDetectedNormal
+ metadata:
+ - name: DetectorName
+ type: object_path
+ primary: true
+ description: The name or identifier of the leak detector.
+ en:
+ description:
+ The leak detector has returned to its normal operating state.
+ message: The {DetectorName} has returned to normal.
+ resolution: None.