From 7db117d7d5316bbf8ff8de89ef83e8f389d2eca5 Mon Sep 17 00:00:00 2001 From: Marek Hulan Date: Tue, 8 Jul 2025 21:36:21 +0000 Subject: [PATCH] Fixes #38556 - add Host wake on lan sub-command --- lib/hammer_cli_foreman/host.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/hammer_cli_foreman/host.rb b/lib/hammer_cli_foreman/host.rb index cad322fcb..4ca1c86b0 100644 --- a/lib/hammer_cli_foreman/host.rb +++ b/lib/hammer_cli_foreman/host.rb @@ -432,6 +432,17 @@ def option_power_action build_options without: [:power_action] end + class WakeCommand < HammerCLIForeman::SingleResourceCommand + action :wol + + command_name 'wake' + desc _('Send Wake-on-LAN request to a host') + success_message _('Wake-on-LAN request sent successfully.') + failure_message _('Failed to send Wake-on-LAN request') + + build_options + end + class RebuildConfigCommand < HammerCLIForeman::SingleResourceCommand action :rebuild_config command_name "rebuild-config"