Class: KatelloApi::Resources::System

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

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

Instance Method Details

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

  • content_view_id (String)

    specify the content view

  • environment_id (String)

    specify the environment

  • guest_ids (Array)

    ids of the guests running on this system

  • organization_id (String)

    specify the organization

  • system_group_id (String)

    specify the system group

  • activation_keys (String)

    comma-separated list of activation-key ids

  • description (String)

    description of the system

  • facts (Hash)

    key-value hash of system-specific facts allowed keys are:

    • fact [String, nil] any number of facts about this system

  • installed_products (Array, nil)

    list of products installed on the system

  • last_checkin (String)

    last check-in time of this system

  • location (String)

    physical location of the system

  • name (String)

    name of the system

  • release_ver (String)

    release version of the system

  • service_level (String, nil)

    a service level for auto-healing process, e.g. self-support

  • type (String)

    type of the system, it should always be ‘system’

Returns:

  • (Array)

    First item: parsed data; second item: raw body



223
224
225
# File 'lib/katello_api/resources/system.rb', line 223

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

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

    uuid of the system

  • system_group_ids (Array)

    list of group ids the system belongs to

Returns:

  • (Array)

    First item: parsed data; second item: raw body



121
122
123
# File 'lib/katello_api/resources/system.rb', line 121

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

#available_system_groups(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/systems/:id/available_system_groups 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



102
103
104
# File 'lib/katello_api/resources/system.rb', line 102

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

  • content_view_id (String)

    specify the content view

  • environment_id (String)

    specify the environment

  • guest_ids (Array)

    ids of the guests running on this system

  • organization_id (String)

    specify the organization

  • system_group_id (String)

    specify the system group

  • description (String)

    description of the system

  • facts (Hash)

    key-value hash of system-specific facts allowed keys are:

    • fact [String, nil] any number of facts about this system

  • installed_products (Array, nil)

    list of products installed on the system

  • last_checkin (String)

    last check-in time of this system

  • location (String)

    physical location of the system

  • name (String)

    name of the system

  • release_ver (String)

    release version of the system

  • service_level (String, nil)

    a service level for auto-healing process, e.g. self-support

  • type (String)

    type of the system, it should always be ‘system’

Returns:

  • (Array)

    First item: parsed data; second item: raw body



51
52
53
# File 'lib/katello_api/resources/system.rb', line 51

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)

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



111
112
113
# File 'lib/katello_api/resources/system.rb', line 111

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

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

    uuid of the system

  • enabled_repos (Hash)

    allowed keys are:

    • repos [Array]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



235
236
237
# File 'lib/katello_api/resources/system.rb', line 235

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

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

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



158
159
160
# File 'lib/katello_api/resources/system.rb', line 158

def errata(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 (String)

    filter by environment

  • organization_id (String)

    specify the organization

  • pool_id (String)

    filter systems by subscribed pool

  • system_group_id (String)

    filter by system group

  • full_results (String)

    whether or not to show all results

  • name (String)

    filter systems by name

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

  • uuid (String)

    filter systems by uuid

Returns:

  • (Array)

    First item: parsed data; second item: raw body



27
28
29
# File 'lib/katello_api/resources/system.rb', line 27

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

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

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



140
141
142
# File 'lib/katello_api/resources/system.rb', line 140

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

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

    uuid of the system

  • match_installed (String)

    match pools to installed

  • match_system (String)

    match pools to system

  • no_overlap (String)

    allow overlap

Returns:

  • (Array)

    First item: parsed data; second item: raw body



189
190
191
# File 'lib/katello_api/resources/system.rb', line 189

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

#refresh_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 (String)

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



149
150
151
# File 'lib/katello_api/resources/system.rb', line 149

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

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

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



198
199
200
# File 'lib/katello_api/resources/system.rb', line 198

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

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

    uuid of the system

  • system_group_ids (Array)

    list of system groups ids to remove from the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



131
132
133
# File 'lib/katello_api/resources/system.rb', line 131

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

#report(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/systems/report path

  • organization_id (Object)

    Part of /api/organizations/:organization_id/systems/report path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



177
178
179
# File 'lib/katello_api/resources/system.rb', line 177

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

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

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

    uuid of the system

Returns:

  • (Array)

    First item: parsed data; second item: raw body



167
168
169
# File 'lib/katello_api/resources/system.rb', line 167

def tasks(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/systems/:id path

  • content_view_id (String)

    specify the content view

  • environment_id (String)

    specify the environment

  • guest_ids (Array)

    ids of the guests running on this system

  • description (String)

    description of the system

  • facts (Hash)

    key-value hash of system-specific facts allowed keys are:

    • fact [String, nil] any number of facts about this system

  • installed_products (Array, nil)

    list of products installed on the system

  • last_checkin (String)

    last check-in time of this system

  • location (String)

    physical location of the system

  • name (String)

    name of the system

  • release_ver (String)

    release version of the system

  • service_level (String, nil)

    a service level for auto-healing process, e.g. self-support

  • type (String)

    type of the system, it should always be ‘system’

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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