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

- (AuthenticationMethod) authentication_method

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

- (Object) change_my_password(opts)

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)
  check_params(opts,[:password])
  super
end

- (Object) change_password(opts)

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)
  check_params(opts,[:passwords])
  super
end

- (Object) change_password_2(opts)

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)
  check_params(opts,[:passwords])
  super
end

- (Object) create_user(opts)

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)
  check_params(opts,[:users])
  super
end

- (Object) create_user_2(opts)

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)
  check_params(opts,[:users])
  super
end

- (Object) create_user_3(opts)

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)
  check_params(opts,[:users])
  super
end

- (String) default_partition

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

- (UserRole) default_role

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

- (Object) delete_user

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

- (String) encrypted_password

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

- (String) fullname

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

- (long) group_id

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

- (String) home_directory

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

- (boolean) is_locked_out

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

- (UserID) list

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

- (String) login_shell

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

- (UserPermission) my_permission

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

- (boolean) remote_console_access

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

- (Object) reset_locked_out

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

- (UserRole) role

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

- (Object) set_authentication_method(opts)

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)
  check_params(opts,[:auth_method])
  super
end

- (Object) set_default_partition(opts)

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)
  check_params(opts,[:partition])
  super
end

- (Object) set_default_role(opts)

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)
  check_params(opts,[:role])
  super
end

- (Object) set_fullname(opts)

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)
  check_params(opts,[:fullnames])
  super
end

- (Object) set_group_id(opts)

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)
  check_params(opts,[:gids])
  super
end

- (Object) set_home_directory(opts)

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)
  check_params(opts,[:directories])
  super
end

- (Object) set_login_shell(opts)

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)
  check_params(opts,[:shells])
  super
end

- (Object) set_remote_console_access(opts)

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)
  check_params(opts,[:enabled])
  super
end

- (Object) set_role(opts)

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)
  check_params(opts,[:roles])
  super
end

- (Object) set_user_id(opts)

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)
  check_params(opts,[:uids])
  super
end

- (Object) set_user_permission(opts)

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)
  check_params(opts,[:permissions])
  super
end

- (long) user_id

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

- (UserPermission[]) user_permission

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

- (String) version

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