Class: KatelloApi::Resources::Hostgroup

Inherits:
Base
  • Object
show all
Defined in:
lib/katello_api/resources/hostgroup.rb

Constant Summary

Constant Summary

Constants inherited from Base

Base::API_VERSION

Instance Attribute Summary

Attributes inherited from Base

#client, #config

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 KatelloApi::Base

Class Method Details

+ (Object) doc



4
5
6
# File 'lib/katello_api/resources/hostgroup.rb', line 4

def self.doc
  @doc ||= KatelloApi.doc['resources']["hostgroups"]
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 (Hash, nil)

    allowed keys are:

    • architecture_id [String, nil]

    • domain_id [String, nil]

    • environment_id [String, nil]

    • medium_id [String, nil]

    • operatingsystem_id [String, nil]

    • parent_id [String, nil]

    • ptable_id [String, nil]

    • puppet_ca_proxy_id [String, nil]

    • puppet_proxy_id [String, nil]

    • subnet_id [String, nil]

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



46
47
48
# File 'lib/katello_api/resources/hostgroup.rb', line 46

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)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



77
78
79
# File 'lib/katello_api/resources/hostgroup.rb', line 77

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):

  • order (String)

    sort results

  • page (String)

    paginate results

  • per_page (String)

    number of entries per request

  • search (String)

    filter results

Returns:

  • (Array)

    First item: parsed data; second item: raw body



16
17
18
# File 'lib/katello_api/resources/hostgroup.rb', line 16

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

- (Array) show(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)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



25
26
27
# File 'lib/katello_api/resources/hostgroup.rb', line 25

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

- (Array) update(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)
  • hostgroup (Hash, nil)

    allowed keys are:

    • architecture_id [String, nil]

    • domain_id [String, nil]

    • environment_id [String, nil]

    • medium_id [String, nil]

    • operatingsystem_id [String, nil]

    • parent_id [String, nil]

    • ptable_id [String, nil]

    • puppet_ca_proxy_id [String, nil]

    • puppet_proxy_id [String, nil]

    • subnet_id [String, nil]

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



68
69
70
# File 'lib/katello_api/resources/hostgroup.rb', line 68

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