Module: ForemanOpentofu::PowerCapability

Defined in:
app/services/foreman_opentofu/power_capability.rb

Class Method Summary collapse

Class Method Details

.power_change_disabled_for_host?(host) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
# File 'app/services/foreman_opentofu/power_capability.rb', line 5

def power_change_disabled_for_host?(host)
  cr = host&.compute_resource
  return false unless cr.is_a?(ForemanOpentofu::Tofu)

  cr.tofu_provider&.capabilities&.include?(:power_status_only)
rescue StandardError
  false
end