Class: KatelloApi::Resources::User

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

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

Instance Method Details

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

  • role_id (Numeric)
  • user_id (Object)

    Part of /api/users/:user_id/roles path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



86
87
88
# File 'lib/katello_api/resources/user.rb', line 86

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

  • default_environment_id (Numeric, nil)
  • disabled (String, nil)
  • email (String)
  • password (String)
  • username (String)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



37
38
39
# File 'lib/katello_api/resources/user.rb', line 37

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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



59
60
61
# File 'lib/katello_api/resources/user.rb', line 59

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

  • disabled (String)

    filter by disabled flag

  • email (String)

    filter by email

  • username (String)

    filter by username

Returns:

  • (Array)

    First item: parsed data; second item: raw body



15
16
17
# File 'lib/katello_api/resources/user.rb', line 15

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

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

  • user_id (Object)

    Part of /api/users/:user_id/roles path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



68
69
70
# File 'lib/katello_api/resources/user.rb', line 68

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

#remove_role(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/users/:user_id/roles/:id path

  • user_id (Object)

    Part of /api/users/:user_id/roles/:id path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



96
97
98
# File 'lib/katello_api/resources/user.rb', line 96

def remove_role(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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



104
105
106
# File 'lib/katello_api/resources/user.rb', line 104

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 (Object)

    Part of /api/users/:id path

Returns:

  • (Array)

    First item: parsed data; second item: raw body



24
25
26
# File 'lib/katello_api/resources/user.rb', line 24

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

#sync_ldap_roles(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

Returns:

  • (Array)

    First item: parsed data; second item: raw body



76
77
78
# File 'lib/katello_api/resources/user.rb', line 76

def sync_ldap_roles(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/users/:id path

  • default_environment_id (Numeric, nil)
  • disabled (String, nil)
  • email (String)
  • password (String)

Returns:

  • (Array)

    First item: parsed data; second item: raw body



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

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