Class: ForemanApi::Resources::Image

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) doc



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

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

  • compute_resource_id (String)
  • image (Hash)

    allowed keys are:

    • architecture_id [String]

    • compute_resource_id [String]

    • operatingsystem_id [String]

    • name [String]

    • username [String]

    • uuid [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



44
45
46
# File 'lib/foreman_api/resources/image.rb', line 44

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)
  • compute_resource_id (String)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



72
73
74
# File 'lib/foreman_api/resources/image.rb', line 72

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

  • compute_resource_id (String)
  • 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



17
18
19
# File 'lib/foreman_api/resources/image.rb', line 17

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)
  • compute_resource_id (String)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



27
28
29
# File 'lib/foreman_api/resources/image.rb', line 27

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)
  • compute_resource_id (String)
  • image (Hash)

    allowed keys are:

    • architecture_id [String]

    • compute_resource_id [String]

    • operatingsystem_id [String]

    • name [String]

    • username [String]

    • uuid [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



62
63
64
# File 'lib/foreman_api/resources/image.rb', line 62

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