class HammerCLIForeman::Host::StatusCommand

Public Instance Methods

get_power_status() click to toggle source
# File lib/hammer_cli_foreman/host.rb, line 156
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 148
def get_status
  params = {
    'id' => get_identifier,
  }
  status = resource.call(:status, params)
  status["status"]
end
send_request() click to toggle source
# File lib/hammer_cli_foreman/host.rb, line 141
def send_request
  {
    :status => get_status,
    :power => get_power_status
  }
end