Class: ForemanApi::Resources::HostgroupClass

Inherits:
Base
  • Object
show all
Defined in:
lib/foreman_api/resources/hostgroup_class.rb

Constant Summary

Constants inherited from Base

Base::API_VERSION

Instance Attribute Summary

Attributes inherited from Base

#client, #config, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#http_call, #initialize, method_doc, #perform_call, #validate_params!, validation_hash

Constructor Details

This class inherits a constructor from ForemanApi::Base

Class Method Details

.docObject



4
5
6
# File 'lib/foreman_api/resources/hostgroup_class.rb', line 4

def self.doc
  @doc ||= ForemanApi.doc['resources']["hostgroup_classes"]
end

Instance Method Details

#create(params = {}, headers = {}) ⇒ Array

Returns First item: parsed data; second item: raw body.

Options Hash (params):

  • hostgroup_id (String)

    id of hostgroup

  • puppetclass_id (String)

    id of puppetclass



23
24
25
# File 'lib/foreman_api/resources/hostgroup_class.rb', line 23

def create(params = {}, headers = {})
  perform_call(__method__, params, headers)
end

#destroy(params = {}, headers = {}) ⇒ Array

Returns First item: parsed data; second item: raw body.

Options Hash (params):

  • id (String)

    id of puppetclass

  • hostgroup_id (String)

    id of hostgroup



33
34
35
# File 'lib/foreman_api/resources/hostgroup_class.rb', line 33

def destroy(params = {}, headers = {})
  perform_call(__method__, params, headers)
end

#index(params = {}, headers = {}) ⇒ Array

Returns First item: parsed data; second item: raw body.

Options Hash (params):

  • hostgroup_id (Object)

    Part of /api/hostgroups/:hostgroup_id/puppetclass_ids path



13
14
15
# File 'lib/foreman_api/resources/hostgroup_class.rb', line 13

def index(params = {}, headers = {})
  perform_call(__method__, params, headers)
end