class HammerCLIForeman::Host::StatusCommand

Public Instance Methods

get_power_status() click to toggle source
# File lib/hammer_cli_foreman/host.rb, line 154
def get_power_status
  params = {
    'id' => get_identifier,
    'power_action' => :state
  }
  status = resource.call(:power, params)
  status["power"]
end
get_status() click to toggle source
# File lib/hammer_cli_foreman/host.rb, line 145
def get_status
  params = {
    'id' => get_identifier,
    'type' => option_type || 'configuration'
  }
  status = resource.call(:get_status, params)
  status['status_label']
end
send_request() click to toggle source
# File lib/hammer_cli_foreman/host.rb, line 138
def send_request
  {
    :status => get_status,
    :power => get_power_status
  }
end