Class: KatelloApi::Resources::Product

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

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

  • gpg_key_id (String)

    identifier of the gpg key

  • provider_id (String)

    provider the product belongs to

  • description (String)

    product description

  • label (String)
  • name (String)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



29
30
31
# File 'lib/katello_api/resources/product.rb', line 29

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)

    product numeric identifier

  • organization_id (String)

    organization identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



64
65
66
# File 'lib/katello_api/resources/product.rb', line 64

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/products path

  • organization_id (String)

    organization identifier

  • include_marketing (String)

    include marketing products in results

  • name (String)

    product identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



16
17
18
# File 'lib/katello_api/resources/product.rb', line 16

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

#remove_sync_plan(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)

    product numeric identifier

  • organization_id (String)

    organization identifier

  • plan_id (String)

    plan numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

#repositories(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)

    product numeric identifier

  • content_view_id (String)

    find repos in content view instead of default content view

  • environment_id (String)

    environment identifier

  • organization_id (String)

    organization identifier

  • include_disabled (String)

    set to true if you want to list disabled repositories

  • name (String)

    repository identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



78
79
80
# File 'lib/katello_api/resources/product.rb', line 78

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

#set_sync_plan(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)

    product numeric identifier

  • organization_id (String)

    organization identifier

  • plan_id (String)

    plan numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



89
90
91
# File 'lib/katello_api/resources/product.rb', line 89

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

    product numeric identifier

  • organization_id (String)

    organization identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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)

    product numeric identifier

  • organization_id (String)

    organization identifier

  • product (Hash)

    allowed keys are:

    • description [String, nil] product description

    • gpg_key_name [String, nil] identifier of the gpg key

    • recursive [String] set to true to recursive update gpg key

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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