Class: KatelloApi::Resources::Environment

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

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

  • environment (Hash, nil)

    allowed keys are:

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



49
50
51
# File 'lib/katello_api/resources/environment.rb', line 49

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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



70
71
72
# File 'lib/katello_api/resources/environment.rb', line 70

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

- (Array) import_puppetclasses(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)
  • environment_id (String)
  • smart_proxy_id (String)
  • dryrun (String)
  • except (String)

    optional comma-deliminated string containing either ‘new,updated,obsolete’ used to limit the import_puppetclasses actions

Returns:

  • (Array)

    First item: parsed data; second item: raw body



17
18
19
# File 'lib/katello_api/resources/environment.rb', line 17

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

  • order (String)

    sort results

  • page (String)

    paginate results

  • per_page (String)

    number of entries per request

  • search (String)

    filter results

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



38
39
40
# File 'lib/katello_api/resources/environment.rb', line 38

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)
  • environment (Hash, nil)

    allowed keys are:

    • name [String]

Returns:

  • (Array)

    First item: parsed data; second item: raw body



61
62
63
# File 'lib/katello_api/resources/environment.rb', line 61

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