Class: ForemanApi::Resources::Architecture

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.docObject


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

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

Instance Method Details

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

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

  • architecture (Hash, nil)

    allowed keys are:

    • operatingsystem_ids [Array, nil] operatingsystem id’s

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body


37
38
39
# File 'lib/foreman_api/resources/architecture.rb', line 37

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

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

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


59
60
61
# File 'lib/foreman_api/resources/architecture.rb', line 59

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

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

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/foreman_api/resources/architecture.rb', line 16

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

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

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/foreman_api/resources/architecture.rb', line 25

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

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

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

    allowed keys are:

    • operatingsystem_ids [Array, nil] operatingsystem id’s

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body


50
51
52
# File 'lib/foreman_api/resources/architecture.rb', line 50

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