Class: ForemanApi::Resources::Parameter

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) doc



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

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

Instance Method Details

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

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 parameter

  • domain_id (String)

    Id of domain

  • host_id (String)

    Id of host

  • hostgroup_id (String)

    Id of hostgroup

  • operatingsystem_id (String)

    Id of operating system

  • parameter (Hash)

    allowed keys are:

    • name [String]
    • value [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



48
49
50
# File 'lib/foreman_api/resources/parameter.rb', line 48

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

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

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 parameter

  • domain_id (String)

    Id of domain

  • host_id (String)

    Id of host

  • hostgroup_id (String)

    Id of hostgroup

  • operatingsystem_id (String)

    Id of operating system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



78
79
80
# File 'lib/foreman_api/resources/parameter.rb', line 78

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

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

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

  • domain_id (String)

    Id of domain

  • host_id (String)

    Id of host

  • hostgroup_id (String)

    Id of hostgroup

  • operatingsystem_id (String)

    Id of operating system

  • page (String)

    Paginate results

  • per_page (String)

    Number of entries per request

Returns:

  • (Array)

    First item: parsed data; second item: raw body



18
19
20
# File 'lib/foreman_api/resources/parameter.rb', line 18

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

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

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

  • domain_id (Object)

    Part of /api/domain/:domain_id/parameters path

  • host_id (Object)

    Part of /api/host/:host_id/parameters path

  • hostgroup_id (Object)

    Part of /api/hostgroup/:hostgroup_id/parameters path

  • operatingsystem_id (Object)

    Part of /api/operatingsystem/:operatingsystem_id/parameters path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



90
91
92
# File 'lib/foreman_api/resources/parameter.rb', line 90

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

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

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 parameter

  • domain_id (String)

    Id of domain

  • host_id (String)

    Id of host

  • hostgroup_id (String)

    Id of hostgroup

  • operatingsystem_id (String)

    Id of operating system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



31
32
33
# File 'lib/foreman_api/resources/parameter.rb', line 31

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

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

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 parameter

  • domain_id (String)

    Id of domain

  • host_id (String)

    Id of host

  • hostgroup_id (String)

    Id of hostgroup

  • operatingsystem_id (String)

    Id of operating system

  • parameter (Hash)

    allowed keys are:

    • name [String]
    • value [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



65
66
67
# File 'lib/foreman_api/resources/parameter.rb', line 65

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