Class: IControl::Management::UserManagement

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/management/user_management.rb,
lib/icontrol/management.rb

Overview

The UserManagement interface deals with adding/deleting and modifying users and user permission.

Defined Under Namespace

Classes: PasswordInfo, PasswordInfoSequence, UserID, UserIDSequence, UserInfo, UserInfo2, UserInfo2Sequence, UserInfo3, UserInfo3Sequence, UserInfoSequence, UserPermission, UserPermissionSequence, UserPermissionSequenceSequence, UserRole, UserRoleSequence

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class IControl::Base

Instance Method Details

#authentication_methodAuthenticationMethod

Get the authentication method that the system will use to authenticate user.

Returns:

  • (AuthenticationMethod)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



127
128
129
# File 'lib/icontrol/management/user_management.rb', line 127

def authentication_method
  super
end

#change_my_password(opts) ⇒ Object

Change the password of the user making the request.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



33
34
35
36
# File 'lib/icontrol/management/user_management.rb', line 33

def change_my_password(opts)
  opts = check_params(opts,[:password])
  super(opts)
end

#change_password(opts) ⇒ Object

Change the user’s password.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :passwords (String)

    The new clear-text passwords.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



46
47
48
49
# File 'lib/icontrol/management/user_management.rb', line 46

def change_password(opts)
  opts = check_params(opts,[:passwords])
  super(opts)
end

#change_password_2(opts) ⇒ Object

Change the user’s password.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



59
60
61
62
# File 'lib/icontrol/management/user_management.rb', line 59

def change_password_2(opts)
  opts = check_params(opts,[:passwords])
  super(opts)
end

#create_user(opts) ⇒ Object

Note: this method is deprecated; please use create_user_3 and associated data. (home directory, user id, and group id are now computed by the system, and there is now a choice of whether the password is encrypted) Create this new user. Note: as of v10.1.0, this method will silently ignore any of user id, group id, and home directory passed in.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



76
77
78
79
# File 'lib/icontrol/management/user_management.rb', line 76

def create_user(opts)
  opts = check_params(opts,[:users])
  super(opts)
end

#create_user_2(opts) ⇒ Object

Note: this method is deprecated; please use create_user_3 and associated data. (home directory, user id, and group id are now computed by the system) Create this new user. Note: as of v10.1.0, this method will silently ignore any of user id, group id, and home directory passed in.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



92
93
94
95
# File 'lib/icontrol/management/user_management.rb', line 92

def create_user_2(opts)
  opts = check_params(opts,[:users])
  super(opts)
end

#create_user_3(opts) ⇒ Object

Create this new user.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



105
106
107
108
# File 'lib/icontrol/management/user_management.rb', line 105

def create_user_3(opts)
  opts = check_params(opts,[:users])
  super(opts)
end

#default_partitionString

Get the default user partition for the device.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



138
139
140
# File 'lib/icontrol/management/user_management.rb', line 138

def default_partition
  super
end

#default_roleUserRole

Get the default user role for the device.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



149
150
151
# File 'lib/icontrol/management/user_management.rb', line 149

def default_role
  super
end

#delete_userObject

Delete this user.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



116
117
118
# File 'lib/icontrol/management/user_management.rb', line 116

def delete_user
  super
end

#encrypted_passwordString

Gets the encrypted passwords of this user.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



160
161
162
# File 'lib/icontrol/management/user_management.rb', line 160

def encrypted_password
  super
end

#fullnameString

Get the full names for the given user.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



171
172
173
# File 'lib/icontrol/management/user_management.rb', line 171

def fullname
  super
end

#group_idlong

Get the Group IDs for the given usernames.

Returns:

  • (long)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



182
183
184
# File 'lib/icontrol/management/user_management.rb', line 182

def group_id
  super
end

#home_directoryString

Get the default home directories for the given usernames.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



193
194
195
# File 'lib/icontrol/management/user_management.rb', line 193

def home_directory
  super
end

#is_locked_outboolean

Checks to see if a user is locked out due to exceeding the maximum number of allowed login failures. Return whether the user is locked out.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



295
296
297
# File 'lib/icontrol/management/user_management.rb', line 295

def is_locked_out
  super
end

#listUserID

List all user.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



204
205
206
# File 'lib/icontrol/management/user_management.rb', line 204

def list
  super
end

#login_shellString

Get the login shells for the given usernames.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



215
216
217
# File 'lib/icontrol/management/user_management.rb', line 215

def 
  super
end

#my_permissionUserPermission

Gets the credentials of the user making the request. This is useful in getting your own permission information (regardless of which partitions you may otherwise read). The results indicate what role you have on a what partitions.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)


228
229
230
# File 'lib/icontrol/management/user_management.rb', line 228

def my_permission
  super
end

#remote_console_accessboolean

Get the user remote console access for the device.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



239
240
241
# File 'lib/icontrol/management/user_management.rb', line 239

def remote_console_access
  super
end

#reset_locked_outObject

Resets the lockout status of a user that has exceeded the maximum number of allowed login failures. Unlocks all user provided in user_names unless an error occurs where it may unlock up to that user that caused the error.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



307
308
309
# File 'lib/icontrol/management/user_management.rb', line 307

def reset_locked_out
  super
end

#roleUserRole

This method is now deprecated. Please use get_user_permission in its stead, which uses a larger concept of user roles. Gets the roles of this user.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



251
252
253
# File 'lib/icontrol/management/user_management.rb', line 251

def role
  super
end

#set_authentication_method(opts) ⇒ Object

Sets the authentication method that the system will use to authenticate user.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



319
320
321
322
# File 'lib/icontrol/management/user_management.rb', line 319

def set_authentication_method(opts)
  opts = check_params(opts,[:auth_method])
  super(opts)
end

#set_default_partition(opts) ⇒ Object

Sets the default user partition for the device if the user does not have an explicit partition.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :partition (String)

    The default partition for system users.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



333
334
335
336
# File 'lib/icontrol/management/user_management.rb', line 333

def set_default_partition(opts)
  opts = check_params(opts,[:partition])
  super(opts)
end

#set_default_role(opts) ⇒ Object

Sets the default user role for the device if the user does not have an explicit role.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



346
347
348
349
# File 'lib/icontrol/management/user_management.rb', line 346

def set_default_role(opts)
  opts = check_params(opts,[:role])
  super(opts)
end

#set_fullname(opts) ⇒ Object

Sets the full names for this user.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :fullnames (String)

    The users’ full names.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



359
360
361
362
# File 'lib/icontrol/management/user_management.rb', line 359

def set_fullname(opts)
  opts = check_params(opts,[:fullnames])
  super(opts)
end

#set_group_id(opts) ⇒ Object

This method is deprecated, as the operation is not allowed (and will return an error). Sets the Group IDs for this user.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :gids (long)

    The users’ Group IDs .

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



373
374
375
376
# File 'lib/icontrol/management/user_management.rb', line 373

def set_group_id(opts)
  opts = check_params(opts,[:gids])
  super(opts)
end

#set_home_directory(opts) ⇒ Object

This method is deprecated, as the operation is not allowed (and will return an error). Sets the home directories for this user.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :directories (String)

    The home directories.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



387
388
389
390
# File 'lib/icontrol/management/user_management.rb', line 387

def set_home_directory(opts)
  opts = check_params(opts,[:directories])
  super(opts)
end

#set_login_shell(opts) ⇒ Object

Sets the login shells for this user.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :shells (String)

    The users’ login shells.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



400
401
402
403
# File 'lib/icontrol/management/user_management.rb', line 400

def (opts)
  opts = check_params(opts,[:shells])
  super(opts)
end

#set_remote_console_access(opts) ⇒ Object

Sets the user remote console access for the device if the user does not have an explicit remote console access.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :enabled (boolean)

    The remote console access for system users.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



414
415
416
417
# File 'lib/icontrol/management/user_management.rb', line 414

def set_remote_console_access(opts)
  opts = check_params(opts,[:enabled])
  super(opts)
end

#set_role(opts) ⇒ Object

This method is now deprecated. Please use set_user_permission in its stead, which uses a larger concept of user roles. Change the user’s role.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



428
429
430
431
# File 'lib/icontrol/management/user_management.rb', line 428

def set_role(opts)
  opts = check_params(opts,[:roles])
  super(opts)
end

#set_user_id(opts) ⇒ Object

This method is deprecated, as the operation is not allowed (and will return an error). Sets the User IDs for this user.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :uids (long)

    The users’ User IDs .

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



442
443
444
445
# File 'lib/icontrol/management/user_management.rb', line 442

def set_user_id(opts)
  opts = check_params(opts,[:uids])
  super(opts)
end

#set_user_permission(opts) ⇒ Object

Sets the permissions of this user. The permission basically indicates what role a user has on a given partition. A user could have one role on a partition, and a different role on another partition, hence the permission list is a sequence of sequence.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



457
458
459
460
# File 'lib/icontrol/management/user_management.rb', line 457

def set_user_permission(opts)
  opts = check_params(opts,[:permissions])
  super(opts)
end

#user_idlong

Get the User IDs for the given usernames.

Returns:

  • (long)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



262
263
264
# File 'lib/icontrol/management/user_management.rb', line 262

def user_id
  super
end

#user_permissionUserPermission[]

Gets the permissions of this user. The permission basically indicates what role a user has on a given partition. A user could have one role on a partition, and a different role on another partition, hence the return list is a sequence of sequence.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.



275
276
277
# File 'lib/icontrol/management/user_management.rb', line 275

def user_permission
  super
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)


283
284
285
# File 'lib/icontrol/management/user_management.rb', line 283

def version
  super
end