Class: ForemanApi::Resources::Role

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) doc



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

def self.doc
  @doc ||= ForemanApi.doc['resources']["roles"]
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):

  • role (Hash, nil)

    allowed keys are:

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



34
35
36
# File 'lib/foreman_api/resources/role.rb', line 34

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



55
56
57
# File 'lib/foreman_api/resources/role.rb', line 55

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

  • page (String)

    paginate results

  • per_page (String)

    number of entries per request

Returns:

  • (Array)

    First item: parsed data; second item: raw body



14
15
16
# File 'lib/foreman_api/resources/role.rb', line 14

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



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

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)
  • role (Hash, nil)

    allowed keys are:

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



46
47
48
# File 'lib/foreman_api/resources/role.rb', line 46

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