Module: Wavefront::Mixin::User

Included in:
Account, Role, User, UserGroup
Defined in:
lib/wavefront-sdk/api_mixins/user.rb

Overview

Things needed by User and UserGroup classes

Instance Method Summary collapse

Instance Method Details

#validate_account_list(list) ⇒ Object

Validate a list of accounts.

Parameters:

Raises:

  • Wavefront::Exception::InvalidAccount



33
34
35
36
37
# File 'lib/wavefront-sdk/api_mixins/user.rb', line 33

def (list)
  raise ArgumentError unless list.is_a?(Array)

  list.each { |id| (id) }
end

#validate_role_list(list) ⇒ Object

Validate a list of roles

Parameters:

Raises:

  • Wavefront::Exception::InvalidRole



43
44
45
46
47
# File 'lib/wavefront-sdk/api_mixins/user.rb', line 43

def validate_role_list(list)
  raise ArgumentError unless list.is_a?(Array)

  list.each { |id| wf_role_id?(id) }
end

#validate_user_list(list) ⇒ Object

Validate a list of users.

Parameters:

Raises:

  • Wavefront::Exception::InvalidUser



13
14
15
16
17
# File 'lib/wavefront-sdk/api_mixins/user.rb', line 13

def validate_user_list(list)
  raise ArgumentError unless list.is_a?(Array)

  list.each { |id| wf_user_id?(id) }
end

#validate_usergroup_list(list) ⇒ Object

Validate a list of user groups

Parameters:

Raises:

  • Wavefront::Exception::InvalidUserGroup



23
24
25
26
27
# File 'lib/wavefront-sdk/api_mixins/user.rb', line 23

def validate_usergroup_list(list)
  raise ArgumentError unless list.is_a?(Array)

  list.each { |id| wf_usergroup_id?(id) }
end