# File lib/foreman_api/resources/host.rb, line 4 def self.doc @doc ||= ForemanApi.doc['resources']["hosts"] end
@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 146 def boot(params = {}, headers = {}) perform_call(__method__, params, headers) end
@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] * 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] * interfaces_attributes [Hash] * 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
@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 108 def destroy(params = {}, headers = {}) perform_call(__method__, params, headers) end
@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 158 def facts(params = {}, headers = {}) perform_call(__method__, params, headers) end
@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
@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 136 def power(params = {}, headers = {}) perform_call(__method__, params, headers) end
@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 126 def puppetrun(params = {}, headers = {}) perform_call(__method__, params, headers) end
@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
@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 117 def status(params = {}, headers = {}) perform_call(__method__, params, headers) end
@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] * 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 99 def update(params = {}, headers = {}) perform_call(__method__, params, headers) end