Class: ForemanApi::Resources::HostgroupClass

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) doc



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

- (Array) create(params = {}, headers = {})

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

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • hostgroup_id (String)

    id of hostgroup

  • puppetclass_id (String)

    id of puppetclass

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

- (Array) destroy(params = {}, headers = {})

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

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • id (String)

    id of puppetclass

  • hostgroup_id (String)

    id of hostgroup

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

- (Array) index(params = {}, headers = {})

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

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to be passed to the service

  • headers (Hash) (defaults to: {})

    additional http headers

Options Hash (params):

  • hostgroup_id (Object)

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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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