add events for leak detector group
Add the leak events to be reported for leak detector groups. Currently,
there is no standard redfish messages registry for these events, hence
adding them to openBMC namespace.
```
https://redfishforum.com/thread/1074/redfish-message-registry-leakdetection
```
Change-Id: I83aa5589426726f537c768d9ac05aa42a065abba
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/gen/xyz/openbmc_project/State/Leak/DetectorGroup/meson.build b/gen/xyz/openbmc_project/State/Leak/DetectorGroup/meson.build
index 8029998..90a35fa 100644
--- a/gen/xyz/openbmc_project/State/Leak/DetectorGroup/meson.build
+++ b/gen/xyz/openbmc_project/State/Leak/DetectorGroup/meson.build
@@ -5,9 +5,12 @@
generated_sources += custom_target(
'xyz/openbmc_project/State/Leak/DetectorGroup__cpp'.underscorify(),
input: [
+ '../../../../../../yaml/xyz/openbmc_project/State/Leak/DetectorGroup.events.yaml',
'../../../../../../yaml/xyz/openbmc_project/State/Leak/DetectorGroup.interface.yaml',
],
output: [
+ 'event.cpp',
+ 'event.hpp',
'common.hpp',
'server.hpp',
'server.cpp',
@@ -24,6 +27,8 @@
],
install: should_generate_cpp,
install_dir: [
+ false,
+ get_option('includedir') / sdbusplus_current_path,
get_option('includedir') / sdbusplus_current_path,
get_option('includedir') / sdbusplus_current_path,
false,
diff --git a/gen/xyz/openbmc_project/State/Leak/meson.build b/gen/xyz/openbmc_project/State/Leak/meson.build
index 9413a82..699bda0 100644
--- a/gen/xyz/openbmc_project/State/Leak/meson.build
+++ b/gen/xyz/openbmc_project/State/Leak/meson.build
@@ -40,7 +40,7 @@
generated_markdown += custom_target(
'xyz/openbmc_project/State/Leak/DetectorGroup__markdown'.underscorify(),
- input: [ '../../../../../yaml/xyz/openbmc_project/State/Leak/DetectorGroup.interface.yaml', ],
+ input: [ '../../../../../yaml/xyz/openbmc_project/State/Leak/DetectorGroup.events.yaml', '../../../../../yaml/xyz/openbmc_project/State/Leak/DetectorGroup.interface.yaml', ],
output: [ 'DetectorGroup.md' ],
depend_files: sdbusplusplus_depfiles,
command: [
@@ -55,3 +55,20 @@
build_by_default: should_generate_markdown,
)
+generated_registry += custom_target(
+ 'xyz/openbmc_project/State/Leak/DetectorGroup__registry'.underscorify(),
+ input: [ '../../../../../yaml/xyz/openbmc_project/State/Leak/DetectorGroup.events.yaml', ],
+ output: [ 'DetectorGroup.json' ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'registry',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../../yaml',
+ 'xyz/openbmc_project/State/Leak/DetectorGroup',
+ ],
+ install: should_generate_registry,
+ install_dir: [inst_registry_dir / sdbusplus_current_path],
+ build_by_default: should_generate_registry,
+)
+
diff --git a/yaml/xyz/openbmc_project/State/Leak/DetectorGroup.events.yaml b/yaml/xyz/openbmc_project/State/Leak/DetectorGroup.events.yaml
new file mode 100644
index 0000000..0eb8b2a
--- /dev/null
+++ b/yaml/xyz/openbmc_project/State/Leak/DetectorGroup.events.yaml
@@ -0,0 +1,41 @@
+version: 1.0.0
+
+errors:
+ - name: DetectorGroupCritical
+ severity: critical
+ metadata:
+ - name: DetectorGroupName
+ type: object_path
+ primary: true
+ description: The name or identifier of the leak detector group.
+ en:
+ description: Detector group has a critical status.
+ message: Detector group {DetectorGroupName} is in a critical state.
+ resolution: Inspect the detectors in the group.
+ errno: EPIPE
+
+ - name: DetectorGroupWarning
+ severity: warning
+ metadata:
+ - name: DetectorGroupName
+ type: object_path
+ primary: true
+ description: The name or identifier of the leak detector group.
+ en:
+ description: Detector group has a warning status.
+ message: Detector group {DetectorGroupName} is in a warning state.
+ resolution: Inspect the detectors in the group.
+ errno: EPIPE
+
+events:
+ - name: DetectorGroupNormal
+ metadata:
+ - name: DetectorGroupName
+ type: object_path
+ primary: true
+ description: The name or identifier of the leak detector group.
+ en:
+ description:
+ The detector group has returned to its normal operating state.
+ message: Detector group {DetectorName} is operating normally.
+ resolution: None.