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



221
222
223
# File 'lib/katello_api/resources/system.rb', line 221

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



119
120
121
# File 'lib/katello_api/resources/system.rb', line 119

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

  • 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



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

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



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

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



109
110
111
# File 'lib/katello_api/resources/system.rb', line 109

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



233
234
235
# File 'lib/katello_api/resources/system.rb', line 233

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



156
157
158
# File 'lib/katello_api/resources/system.rb', line 156

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

  • 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



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

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



138
139
140
# File 'lib/katello_api/resources/system.rb', line 138

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



187
188
189
# File 'lib/katello_api/resources/system.rb', line 187

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



147
148
149
# File 'lib/katello_api/resources/system.rb', line 147

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



196
197
198
# File 'lib/katello_api/resources/system.rb', line 196

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



129
130
131
# File 'lib/katello_api/resources/system.rb', line 129

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



175
176
177
# File 'lib/katello_api/resources/system.rb', line 175

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



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

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



165
166
167
# File 'lib/katello_api/resources/system.rb', line 165

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



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

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