Struct lsm::Client [] [src]

pub struct Client { /* fields omitted */ }

Represent the connection to plugin.

Methods

impl Client
[src]

[src]

Create a connection to plugin. Please refer to libstoragemgmt user guide for how to choose the URI and password.

The timeout argument is in milliseconds.

[src]

Gets a list of systems on this connection.

[src]

Gets a list of volumes on this connection.

[src]

Gets a list of pools on this connection.

[src]

Gets a list of disks on this connection.

[src]

Gets a list of file systems on this connection.

[src]

Gets a list of NFS exports on this connection.

[src]

Gets a list of access group on this connection.

[src]

Gets a list of target ports on this connection.

[src]

Gets a list of batteries on this connection.

[src]

Create new volume.

  • pool -- The pool where new volume should allocated from.
  • name -- The name of new volume. It might be altered or ignored.
  • size_bytes -- Size in bytes of new volume. You may use function size_human_2_size_bytes() to convert string like '1.1 GiB' to integer size bytes.
  • thinp -- Whether to create thin provisioning volume. Check VolumeCreateArgThinP

[src]

Delete a volume

Errors

  • LsmError::VolHasChildDep volume has child dependency. e.g. specified volume is a replication source. Please use [Client::vol_child_dep_rm()] to eliminate child dependency.

[src]

Set connection timeout value in milliseconds.

[src]

Get connection timeout value.

[src]

Get system's capabilities.

Capability is used to indicate whether certain functionality is supported by specified storage system. Please check desired function for required capability. To verify capability is supported, use Capabilities::is_supported(). If the functionality is not listed in the enumerated Capability type then that functionality is mandatory and required to exist.

[src]

Get plugin information.

[src]

Changes the read cache percentage for the specified system.

Errors

[src]

Set(override) iSCSI CHAP authentication.

  • init_id -- Initiator ID.
  • in_user -- The inbound authentication username. The inbound authentication means the iSCSI initiator authenticates the iSCSI target using CHAP.
  • in_pass -- The inbond authentication password.
  • out_user -- The outbound authentication username. The outbound authentication means the iSCSI target authenticates the iSCSI initiator using CHAP.
  • out_pass -- The outbound authentication password.

[src]

Resize a volume.

Please check whether pool allows volume resize via Pool.unsupported_actions.

[src]

Replicate a volume.

  • pool -- The pool where new replication target volume should be allocated from. For None, will use the same pool of source volume.
  • rep_type -- Replication type.
  • src_vol -- Replication source volume.
  • name -- Name for replication target volume. Might be altered or ignored.

[src]

[src]

Replicates a portion of a volume to a volume.

  • rep_type -- Replication type.
  • src_vol -- Replication source volume.
  • dst_vol -- Replication target volume.
  • ranges -- Replication block ranges.

[src]

Set a Volume to online.

Enable the specified volume when that volume is disabled by administrator or via Client::volume_disable()

[src]

Disable the read and write access to the specified volume.

[src]

Grant access to a volume for the specified group, also known as LUN masking or mapping.

Errors

[src]

Revokes access to a volume for the specified group

[src]

Create a access group.

Creates a new access group with one initiator in it. You may expand the access group by adding more initiators via Client::access_group_init_add()

Errors

[src]

Delete an access group. Only access group with no volume masked can be deleted.

Errors

[src]

Add an initiator to the access group.

Errors

[src]

Delete an initiator from an access group.

Errors

[src]

Query volumes that the specified access group has access to.

[src]

Retrieves the access groups that have access to the specified volume.

[src]

Check whether volume has child dependencies.

[src]

Delete all child dependencies of the specified volume.

Instruct storage system to remove all child dependencies of the specified volume by duplicating the required storage before breaking replication relationship. This function might take a long time(days or even weeks), you might want to invoke it in a thread.

[src]

Create a new file system.

  • pool -- The pool where new file system should allocated from.
  • name -- The name of new file system. It might be altered or ignored.
  • size_bytes -- Size in bytes of new file system. You may use function size_human_2_size_bytes() to convert string like '1.1 GiB' to integer size bytes.

[src]

Resize of file system.

[src]

Delete a file system.

When file system has snapshot attached, all its snapshot will be deleted also. When file system is exported, all its exports will be deleted also. If specified file system is has child dependency, it cannot be deleted, please use Client::fs_has_child_dep() and Client::fs_child_dep_rm().

[src]

Clones an existing file system

Create a point in time read writeable space efficient copy of specified file system, also know as read writeable snapshot. The new file system will reside in the same pool of specified file system.

Optionally, new file system could be based on a snapshot specified by snapshot argument.

[src]

Clones a file on a file system.

Optionally, file contents could be based on a snapshot specified by snapshot argument.

[src]

Get a list of snapshots of specified file system.

[src]

Create a file system snapshot.

[src]

Delete a file system snapshot.

[src]

Restore a file system based on specified snapshot.

  • fs -- File system to restore.
  • snapshot -- Snapshot to use.
  • all_file -- true for restore all files. false for restore specified files only.
  • files -- Only restored specified files. Ignored if all_file is true.
  • restore_files -- If not None, rename restored files to defined file paths and names

[src]

Checks whether file system has a child dependency.

[src]

Delete all child dependencies of the specified file system.

Instruct storage system to remove all child dependencies of the specified file system by duplicating the required storage before breaking replication relationship. This function might take a long time(days or even weeks), you might want to invoke it in a thread.

[src]

Get supported NFS client authentication types.

[src]

Create or modify an NFS export.

  • fs -- File system to export.
  • export_path -- Export path. If already exists, will modify exist NFS export. If None, will let storage system to generate one.
  • access -- NFS access details.
  • auth_type -- NFS client authentication type. Get from Client::nfs_exp_auth_type_list().
  • options -- Extra NFS options.

[src]

Unexport specified NFS exports.

[src]

Get volume RAID information.

[src]

Get pool member information.

[src]

Get system capability on creating RAIDed volume. For hardware RAID only.

Returns supported RAID types and strip sizes.

[src]

Create RAIDed volume directly from disks. Only for hardware RAID.

[src]

Turn on the identification LED for the specified volume.

All its member disks' identification LED will be turned on.

[src]

Turn off the identification LED for the specified volume.

All its member disks' identification LED will be turned off.

[src]

Get cache information on specified volume.

[src]

Set volume physical disk cache policy.

[src]

Set volume write cache policy.

[src]

Set volume read cache policy.