Class: KatelloApi::Resources::ActivationKey

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

Constant Summary

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

+ (Object) doc



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

- (Array) add_system_groups(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)

    id of the activation key

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

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

  • full_results (String)

    whether or not to show all results

  • name (String)

    system group name to filter by

  • order (String)

    sort field and order, eg. ‘name desc’

  • page (String)

    page number, starting at 1

  • per_page (String)

    number of results per page to return

  • search (String)

    search string

  • sort (Hash)

    hash version of ‘order’ param allowed keys are:

    • by [String] field to sort the results on

    • order [String] how to order the sorted results (e.g. asc for ascending)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

  • content_view_id (String)

    content view id

  • environment_id (String)

    environment id

  • organization_id (String)

    organization identifier

  • description (String)

    description

  • environment (Hash)

    environment

  • label (String)

    unique label

  • name (String)

    name

  • usage_limit (String)

    maximum number of uses

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

def create(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):

  • organization_id (String)

    organization identifier

  • full_results (String)

    whether or not to show all results

  • name (String)

    activation key name to filter by

  • order (String)

    sort field and order, eg. ‘name desc’

  • page (String)

    page number, starting at 1

  • per_page (String)

    number of results per page to return

  • search (String)

    search string

  • sort (Hash)

    hash version of ‘order’ param allowed keys are:

    • by [String] field to sort the results on

    • order [String] how to order the sorted results (e.g. asc for ascending)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

    id of the activation key

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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)

    id of the activation key

  • content_view_id (String)

    content view id

  • environment_id (String)

    environment id

  • organization_id (String)

    organization identifier

  • description (String)

    description

  • name (String)

    name

  • usage_limit (String)

    maximum number of uses

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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