LockOut: add events for Lock-Out / Tag-Out style devices
It is common practice for dangerous machinery to have a Lock-Out-Tag-Out
process (LOTO) to prevent the system from operating while the machine
is being worked on. Servers may have Lock-Out style devices to prevent
either power or liquid cooling operations while the system is in
service. For example, a switch may disable all liquid cooling pumps so
that the coolant does not pump onto the floor while coolant lines are
being repaired.
Add events to indicate the state of a Lock-Out style device.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9ae6cfe02ed492c02e6f19725955ff6b0f0e7afa
diff --git a/gen/xyz/openbmc_project/State/LockOut/meson.build b/gen/xyz/openbmc_project/State/LockOut/meson.build
new file mode 100644
index 0000000..dc41f8e
--- /dev/null
+++ b/gen/xyz/openbmc_project/State/LockOut/meson.build
@@ -0,0 +1,26 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/LockOut'
+
+generated_sources += custom_target(
+ 'xyz/openbmc_project/State/LockOut__cpp'.underscorify(),
+ input: ['../../../../../yaml/xyz/openbmc_project/State/LockOut.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/LockOut',
+ ],
+ install: should_generate_cpp,
+ install_dir: [false, get_option('includedir') / sdbusplus_current_path],
+ build_by_default: should_generate_cpp,
+)
+
diff --git a/gen/xyz/openbmc_project/State/meson.build b/gen/xyz/openbmc_project/State/meson.build
index b318619..0b4feea 100644
--- a/gen/xyz/openbmc_project/State/meson.build
+++ b/gen/xyz/openbmc_project/State/meson.build
@@ -8,6 +8,7 @@
subdir('Drive')
subdir('Host')
subdir('Leak')
+subdir('LockOut')
subdir('OperatingSystem')
subdir('Power')
subdir('PowerOnHours')
@@ -185,6 +186,50 @@
)
generated_markdown += custom_target(
+ 'xyz/openbmc_project/State/LockOut__markdown'.underscorify(),
+ input: ['../../../../yaml/xyz/openbmc_project/State/LockOut.events.yaml'],
+ output: ['LockOut.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/LockOut',
+ ],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
+)
+
+generated_registry += custom_target(
+ 'xyz/openbmc_project/State/LockOut__registry'.underscorify(),
+ input: ['../../../../yaml/xyz/openbmc_project/State/LockOut.events.yaml'],
+ output: ['LockOut.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/LockOut',
+ ],
+ install: should_generate_registry,
+ install_dir: [inst_registry_dir / sdbusplus_current_path],
+ build_by_default: should_generate_registry,
+)
+
+generated_markdown += custom_target(
'xyz/openbmc_project/State/Power__markdown'.underscorify(),
input: ['../../../../yaml/xyz/openbmc_project/State/Power.events.yaml'],
output: ['Power.md'],
diff --git a/yaml/xyz/openbmc_project/State/LockOut.events.yaml b/yaml/xyz/openbmc_project/State/LockOut.events.yaml
new file mode 100644
index 0000000..8e6b384
--- /dev/null
+++ b/yaml/xyz/openbmc_project/State/LockOut.events.yaml
@@ -0,0 +1,21 @@
+version: 1.0.0
+
+events:
+ - name: LockOutEnabled
+ metadata:
+ - name: Identifier
+ type: object_path
+ primary: true
+ description: The name or identifier of the Lock Out device.
+ en:
+ description: A Lock Out device has been enabled.
+ message: The Lock Out device '{Identifier}' has been enabled.
+ - name: LockOutDisabled
+ metadata:
+ - name: Identifier
+ type: object_path
+ primary: true
+ description: The name or identifier of the Lock Out device.
+ en:
+ description: A Lock Out device has been disabled.
+ message: The Lock Out device '{Identifier}' has been disabled.