Class: KatelloApi::Resources::ActivationKey

Inherits:
Base
  • Object
show all
Defined in:
lib/katello_api/resources/activation_key.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/activation_key.rb', line 4

def self.doc
  @doc ||= KatelloApi.doc['resources']["activation_keys"]
end

Instance Method Details

#add_pool(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 (Object)

    Part of /api/activation_keys/:id/pools path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

#add_system_groups(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 (Object)

    Part of /api/activation_keys/:id/system_groups path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



90
91
92
# File 'lib/katello_api/resources/activation_key.rb', line 90

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

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

  • environment_id (Object)

    Part of /api/environments/:environment_id/activation_keys path

  • activation_key (Hash)

    allowed keys are:

    • content_view_id [String] content view id

    • description [String, nil]

    • name [String] activation key identifier (alphanum characters, space, _ and -)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



38
39
40
# File 'lib/katello_api/resources/activation_key.rb', line 38

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 (Object)

    Part of /api/activation_keys/:id path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

  • environment_id (Object)

    Part of /api/environments/:environment_id/activation_keys path

  • organization_id (Object)

    Part of /api/organizations/:organization_id/activation_keys path

  • name (String)

    lists by activation key name

Returns:

  • (Array)

    First item: parsed data; second item: raw body



15
16
17
# File 'lib/katello_api/resources/activation_key.rb', line 15

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

#remove_pool(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 (Object)

    Part of /api/activation_keys/:id/pools/:poolid path

  • poolid (Object)

    Part of /api/activation_keys/:id/pools/:poolid path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



81
82
83
# File 'lib/katello_api/resources/activation_key.rb', line 81

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

#remove_system_groups(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 (Object)

    Part of /api/activation_keys/:id/system_groups path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



99
100
101
# File 'lib/katello_api/resources/activation_key.rb', line 99

def remove_system_groups(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 (Object)

    Part of /api/activation_keys/:id path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



24
25
26
# File 'lib/katello_api/resources/activation_key.rb', line 24

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 (Object)

    Part of /api/activation_keys/:id path

  • activation_key (Hash)

    allowed keys are:

    • content_view_id [String] content view id

    • environment_id [String, nil]

    • description [String, nil]

    • name [String] activation key identifier (alphanum characters, space, _ and -)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



53
54
55
# File 'lib/katello_api/resources/activation_key.rb', line 53

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