Class: KatelloApi::Resources::Provider

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

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

  • 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

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



101
102
103
# File 'lib/katello_api/resources/provider.rb', line 101

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

    provider numeric identifier

  • force (String)

    force import

  • import (String)

    manifest file

Returns:

  • (Array)

    First item: parsed data; second item: raw body



83
84
85
# File 'lib/katello_api/resources/provider.rb', line 83

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

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

    provider numeric identifier

  • products (Array)

    array of products to import

Returns:

  • (Array)

    First item: parsed data; second item: raw body



120
121
122
# File 'lib/katello_api/resources/provider.rb', line 120

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

  • 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

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

  • 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



135
136
137
# File 'lib/katello_api/resources/provider.rb', line 135

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

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

    provider numeric identifier

  • include_marketing (String)

    include marketing products in results

Returns:

  • (Array)

    First item: parsed data; second item: raw body



72
73
74
# File 'lib/katello_api/resources/provider.rb', line 72

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

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



92
93
94
# File 'lib/katello_api/resources/provider.rb', line 92

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

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

    provider numeric identifier

Returns:

  • (Array)

    First item: parsed data; second item: raw body



110
111
112
# File 'lib/katello_api/resources/provider.rb', line 110

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

    provider numeric identifier

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

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

    provider identifier

  • repository_url (String)

    provider repository url

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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