Class: KatelloApi::Resources::ComputeResource

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

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

.docObject



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

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

  • compute_resource (Hash)

    compute resource info allowed keys are:

    • description [String, nil]

    • name [String]

    • password [String, nil] password for ovirt, ec2, vmware, openstack. secret key for ec2

    • provider [String] providers include libvirt, ovirt, ec2, vmware, openstack, rackspace

    • region [String, nil] for ec2 only

    • server [String, nil] for vmware

    • tenant [String, nil] for openstack only

    • url [String] url for libvirt, ovirt, and openstack

    • user [String, nil] username for ovirt, ec2, vmware, openstack. access key for ec2.

    • uuid [String, nil] for ovirt, vmware datacenter

Returns:

  • (Array)

    First item: parsed data; second item: raw body



41
42
43
# File 'lib/katello_api/resources/compute_resource.rb', line 41

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)

    compute resource name

Returns:

  • (Array)

    First item: parsed data; second item: raw body



71
72
73
# File 'lib/katello_api/resources/compute_resource.rb', line 71

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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



12
13
14
# File 'lib/katello_api/resources/compute_resource.rb', line 12

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)

    compute resource name

Returns:

  • (Array)

    First item: parsed data; second item: raw body



21
22
23
# File 'lib/katello_api/resources/compute_resource.rb', line 21

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)

    compute resource name

  • compute_resource (Hash)

    compute resource info allowed keys are:

    • description [String, nil]

    • name [String]

    • password [String, nil] password for ovirt, ec2, vmware, openstack. secret key for ec2

    • provider [String] providers include libvirt, ovirt, ec2, vmware, openstack, rackspace

    • region [String, nil] for ec2 only

    • server [String, nil] for vmware

    • tenant [String, nil] for openstack only

    • url [String] url for libvirt, ovirt, and openstack

    • user [String, nil] username for ovirt, ec2, vmware, openstack. access key for ec2.

    • uuid [String, nil] for ovirt, vmware datacenter

Returns:

  • (Array)

    First item: parsed data; second item: raw body



62
63
64
# File 'lib/katello_api/resources/compute_resource.rb', line 62

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