From 6c4557e996e2cb337c150f7be93b9227e3469284 Mon Sep 17 00:00:00 2001 From: Abiola Asojo Date: Thu, 28 Aug 2025 20:43:15 +0000 Subject: [PATCH] Add support for ReadyToRemove interface This new D-Bus interface is implemented to indicate whether the item is prepared by the system for removal. This property shall indicate whether the system is prepared for the removal of the item. This matches the Redfish ReadyToRemove interface. It will be on other devices. Change-Id: I5c50f8792d968e3427e64ebf99a2fc5f32aaa87a Signed-off-by: Abiola Asojo --- .../State/ReadyToRemove/meson.build | 40 +++++++++++++++++++ gen/xyz/openbmc_project/State/meson.build | 25 ++++++++++++ .../State/ReadyToRemove.interface.yaml | 9 +++++ 3 files changed, 74 insertions(+) create mode 100644 gen/xyz/openbmc_project/State/ReadyToRemove/meson.build create mode 100644 yaml/xyz/openbmc_project/State/ReadyToRemove.interface.yaml diff --git a/gen/xyz/openbmc_project/State/ReadyToRemove/meson.build b/gen/xyz/openbmc_project/State/ReadyToRemove/meson.build new file mode 100644 index 00000000..64e0abbd --- /dev/null +++ b/gen/xyz/openbmc_project/State/ReadyToRemove/meson.build @@ -0,0 +1,40 @@ +# Generated file; do not modify. + +sdbusplus_current_path = 'xyz/openbmc_project/State/ReadyToRemove' + +generated_sources += custom_target( + 'xyz/openbmc_project/State/ReadyToRemove__cpp'.underscorify(), + input: [ + '../../../../../yaml/xyz/openbmc_project/State/ReadyToRemove.interface.yaml', + ], + output: [ + 'common.hpp', + 'server.hpp', + 'server.cpp', + 'aserver.hpp', + 'client.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/ReadyToRemove', + ], + install: should_generate_cpp, + install_dir: [ + get_option('includedir') / sdbusplus_current_path, + get_option('includedir') / sdbusplus_current_path, + false, + get_option('includedir') / sdbusplus_current_path, + 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 b91ff295..3e182a01 100644 --- a/gen/xyz/openbmc_project/State/meson.build +++ b/gen/xyz/openbmc_project/State/meson.build @@ -10,6 +10,7 @@ subdir('Host') subdir('Leak') subdir('OperatingSystem') subdir('PowerOnHours') +subdir('ReadyToRemove') subdir('ScheduledHostTransition') subdir('Shutdown') subdir('SystemdTarget') @@ -206,6 +207,30 @@ generated_markdown += custom_target( build_by_default: should_generate_markdown, ) +generated_markdown += custom_target( + 'xyz/openbmc_project/State/ReadyToRemove__markdown'.underscorify(), + input: [ + '../../../../yaml/xyz/openbmc_project/State/ReadyToRemove.interface.yaml', + ], + output: ['ReadyToRemove.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/ReadyToRemove', + ], + install: should_generate_markdown, + install_dir: [inst_markdown_dir / sdbusplus_current_path], + build_by_default: should_generate_markdown, +) + generated_markdown += custom_target( 'xyz/openbmc_project/State/ScheduledHostTransition__markdown'.underscorify(), input: [ diff --git a/yaml/xyz/openbmc_project/State/ReadyToRemove.interface.yaml b/yaml/xyz/openbmc_project/State/ReadyToRemove.interface.yaml new file mode 100644 index 00000000..b8e6ec96 --- /dev/null +++ b/yaml/xyz/openbmc_project/State/ReadyToRemove.interface.yaml @@ -0,0 +1,9 @@ +description: > + Implement to indicate whether the item is prepared by the system for + removal. +properties: + - name: ReadyToRemove + type: boolean + description: > + An indication of whether the item is prepared by the system for + removal.