Class: KatelloApi::Resources::Organization

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

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

Instance Method Details

#autoattach_subscriptions(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/organizations/:id/autoattach_subscriptions path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

    organization id, label, or name

  • url (String)

    base url to perform repo discovery on

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

  • description (String)

    description

  • label (String)

    unique label

  • name (String)

    name

Returns:

  • (Array)

    First item: parsed data; second item: raw body



40
41
42
# File 'lib/katello_api/resources/organization.rb', line 40

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/organizations/:id path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



62
63
64
# File 'lib/katello_api/resources/organization.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):

  • 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



20
21
22
# File 'lib/katello_api/resources/organization.rb', line 20

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

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

    organization id, label, or name

  • url (String)

    base url to perform repo discovery on

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

def repo_discover(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/organizations/:id path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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/organizations/:id path

  • description (String)

    description

  • resource (Hash, nil)

    allowed keys are:

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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