Class: KatelloApi::Resources::Provider

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

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

  • organization_id (String)

    organization identifier

  • description (String)

    description of the provider

  • name (String)

    name of the provider

  • provider_type (String)

    the type of the provider

Returns:

  • (Array)

    First item: parsed data; second item: raw body



43
44
45
# File 'lib/katello_api/resources/provider.rb', line 43

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

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



103
104
105
# File 'lib/katello_api/resources/provider.rb', line 103

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

    provider numeric identifier

  • force (String)

    force import

  • import (String)

    manifest file

Returns:

  • (Array)

    First item: parsed data; second item: raw body



85
86
87
# File 'lib/katello_api/resources/provider.rb', line 85

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

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

    provider numeric identifier

  • products (Array)

    array of products to import

Returns:

  • (Array)

    First item: parsed data; second item: raw body



122
123
124
# File 'lib/katello_api/resources/provider.rb', line 122

def import_products(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

  • 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

  • provider_type (String)

    filter providers by type (‘custom’ or ‘red hat’)

  • 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



22
23
24
# File 'lib/katello_api/resources/provider.rb', line 22

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

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

  • id (String)

    provider numeric identifier

  • product (Hash)

    allowed keys are:

    • description [String, nil] product description

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

    • label [String]

    • name [String] product name

Returns:

  • (Array)

    First item: parsed data; second item: raw body



137
138
139
# File 'lib/katello_api/resources/provider.rb', line 137

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

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

    provider numeric identifier

  • include_marketing (String)

    include marketing products in results

Returns:

  • (Array)

    First item: parsed data; second item: raw body



74
75
76
# File 'lib/katello_api/resources/provider.rb', line 74

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

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



94
95
96
# File 'lib/katello_api/resources/provider.rb', line 94

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

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



112
113
114
# File 'lib/katello_api/resources/provider.rb', line 112

def refresh_products(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 provider

Returns:

  • (Array)

    First item: parsed data; second item: raw body



31
32
33
# File 'lib/katello_api/resources/provider.rb', line 31

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)

    provider numeric identifier

  • description (String)

    description of the provider

  • name (String)

    name of the provider

  • provider_type (String)

    the type of the provider

Returns:

  • (Array)

    First item: parsed data; second item: raw body



55
56
57
# File 'lib/katello_api/resources/provider.rb', line 55

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