class ForemanApi::Resources::Host

Public Class Methods

doc() click to toggle source
# File lib/foreman_api/resources/host.rb, line 4
def self.doc
  @doc ||= ForemanApi.doc['resources']["hosts"]
end

Public Instance Methods

boot(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id @option params [String] device boot device, valid devices are disk, cdrom, pxe, bios

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 147
def boot(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
create(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [Hash] host

allowed keys are:
* architecture_id [String]
* compute_resource_id [String]
* domain_id [String]
* environment_id [String]
* hostgroup_id [String]
* image_id [String]
* medium_id [String]
* model_id [String]
* operatingsystem_id [String]
* owner_id [String]
* progress_report_id [String]  uuid to track orchestration tasks status, get /api/orchestration/:uuid/tasks 
* ptable_id [String]
* puppet_ca_proxy_id [String]
* puppet_class_ids [Array]
* puppet_proxy_id [String]
* sp_subnet_id [String]
* subnet_id [String]
* build [String]
* capabilities [String]
* compute_attributes [Hash]
* enabled [String]
* host_parameters_attributes [Array]
* ip [String]  not required if using a subnet with dhcp proxy 
* mac [String]  not required if its a virtual machine 
* managed [String]
* name [String]
* provision_method [String]

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 62
def create(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
destroy(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 109
def destroy(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
facts(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] certname optional: certname of the host @option params [Hash] facts hash containing the facts for the host @option params [String] name hostname of the host @option params [String] type optional: the sti type of host to create

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 159
def facts(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
index(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] order sort results @option params [String] page paginate results @option params [String] per_page number of entries per request @option params [String] search filter results

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 16
def index(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
power(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id @option params [String] power_action power action, valid actions are (‘on’, ‘start’)’, (‘off’, ‘stop’), (‘soft’, ‘reboot’), (‘cycle’, ‘reset’), (‘state’, ‘status’)

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 137
def power(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
puppetrun(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [Object] id Part of +/api/hosts/:id/puppetrun+ path

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 127
def puppetrun(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
show(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 25
def show(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
status(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 118
def status(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
update(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id @option params [Hash] host

allowed keys are:
* architecture_id [String]
* compute_resource_id [String]
* domain_id [String]
* environment_id [String]
* hostgroup_id [String]
* image_id [String]
* medium_id [String]
* model_id [String]
* operatingsystem_id [String]
* owner_id [String]
* progress_report_id [String]  uuid to track orchestration tasks status, get /api/orchestration/:uuid/tasks 
* ptable_id [String]
* puppet_ca_proxy_id [String]
* puppet_class_ids [Array]
* puppet_proxy_id [String]
* sp_subnet_id [String]
* subnet_id [String]
* build [String]
* capabilities [String]
* compute_attributes [Hash]
* enabled [String]
* host_parameters_attributes [Array]
* ip [String]  not required if using a subnet with dhcp proxy 
* mac [String]  not required if its a virtual machine 
* managed [String]
* name [String]
* provision_method [String]

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/host.rb, line 100
def update(params = {}, headers = {})
  perform_call(__method__, params, headers)
end