libstoragemgmt_plug_interface.h File Reference

#include "libstoragemgmt_common.h"
#include "libstoragemgmt_accessgroups.h"
#include "libstoragemgmt_blockrange.h"
#include "libstoragemgmt_capabilities.h"
#include "libstoragemgmt_error.h"
#include "libstoragemgmt_fs.h"
#include "libstoragemgmt_nfsexport.h"
#include "libstoragemgmt_hash.h"
#include "libstoragemgmt_pool.h"
#include "libstoragemgmt_snapshot.h"
#include "libstoragemgmt_systems.h"
#include "libstoragemgmt_volumes.h"
#include "libstoragemgmt_disk.h"
Include dependency graph for libstoragemgmt_plug_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lsm_mgmt_ops_v1
 Callback functions for management operations. More...
struct  lsm_san_ops_v1
 Block array oriented functions (callback functions) NOTE: This structure cannot change as we need to maintain backwards compatibility. More...
struct  lsm_fs_ops_v1
 File system oriented functionality NOTE: This structure cannot change as we need to maintain backwards compatibility. More...
struct  lsm_nas_ops_v1
 NAS system oriented functionality call back functions NOTE: This structure cannot change as we need to maintain backwards compatibility. More...
struct  lsm_ops_v1_2
 Functions added in version 1.2 NOTE: This structure will change during the developement util version 1.2 released. More...

Defines

#define LSM_ERROR_CREATE_PLUGIN_MSG(code, msg)   lsm_error_create(code, msg, NULL, NULL, NULL, 0)
#define LSM_ERROR_CREATE_PLUGIN_EXCEPTION(code, msg, exception)   lsm_error_create((code), (msg), (exception), NULL, NULL, 0)
#define LSM_ERROR_CREATE_PLUGIN_DEBUG(code, msg, exception, debug, debug_data, debug_len)

Typedefs

typedef struct _lsm_plugin lsm_plugin
typedef lsm_pluginlsm_plugin_ptr
typedef int(* lsm_plugin_register )(lsm_plugin_ptr c, const char *uri, const char *password, uint32_t timeout, lsm_flag flags)
typedef int(* lsm_plugin_unregister )(lsm_plugin_ptr c, lsm_flag flags)
typedef int(* lsm_plug_tmo_set )(lsm_plugin_ptr c, uint32_t timeout, lsm_flag flags)
typedef int(* lsm_plug_tmo_get )(lsm_plugin_ptr c, uint32_t *timeout, lsm_flag flags)
typedef int(* lsm_plug_capabilities )(lsm_plugin_ptr c, lsm_system *sys, lsm_storage_capabilities **cap, lsm_flag flags)
typedef int(* lsm_plug_Job_status )(lsm_plugin_ptr c, const char *job, lsm_job_status *status, uint8_t *percent_complete, lsm_data_type *type, void **value, lsm_flag flags)
typedef int(* lsm_plug_job_free )(lsm_plugin_ptr c, char *job_id, lsm_flag flags)
typedef int(* lsm_plug_pool_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_pool **pool_array[], uint32_t *count, lsm_flag flags)
typedef int(* lsm_plug_system_list )(lsm_plugin_ptr c, lsm_system **systems[], uint32_t *system_count, lsm_flag flags)
typedef int(* lsm_plug_volume_list )(lsm_plugin_ptr c, const char *search_key, const char *search_val, lsm_volume **vol_array[], uint32_t *count, lsm_flag flags)
typedef int(* lsm_plug_disk_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_disk **disk_array[], uint32_t *count, lsm_flag flags)
typedef int(* lsm_plug_target_port_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_target_port **target_port_array[], uint32_t *count, lsm_flag flags)
typedef int(* lsm_plug_volume_create )(lsm_plugin_ptr c, lsm_pool *pool, const char *volume_name, uint64_t size, lsm_volume_provision_type provisioning, lsm_volume **new_volume, char **job, lsm_flag flags)
typedef int(* lsm_plug_volume_replicate )(lsm_plugin_ptr c, lsm_pool *pool, lsm_replication_type rep_type, lsm_volume *volume_src, const char *name, lsm_volume **new_replicant, char **job, lsm_flag flags)
typedef int(* lsm_plug_volume_replicate_range_block_size )(lsm_plugin_ptr c, lsm_system *system, uint32_t *bs, lsm_flag flags)
typedef int(* lsm_plug_volume_replicate_range )(lsm_plugin_ptr c, lsm_replication_type rep_type, lsm_volume *source, lsm_volume *dest, lsm_block_range **ranges, uint32_t num_ranges, char **job, lsm_flag flags)
typedef int(* lsm_plug_volume_resize )(lsm_plugin_ptr c, lsm_volume *volume, uint64_t new_size, lsm_volume **resized_volume, char **job, lsm_flag flags)
typedef int(* lsm_plug_volume_delete )(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags)
typedef int(* lsm_plug_volume_enable )(lsm_plugin_ptr c, lsm_volume *v, lsm_flag flags)
typedef int(* lsm_plug_volume_disable )(lsm_plugin_ptr c, lsm_volume *v, lsm_flag flags)
typedef int(* lsm_plug_iscsi_chap_auth )(lsm_plugin_ptr c, const char *init_id, const char *in_user, const char *in_password, const char *out_user, const char *out_password, lsm_flag flags)
typedef int(* lsm_plug_access_group_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags)
typedef int(* lsm_plug_access_group_create )(lsm_plugin_ptr c, const char *name, const char *initiator_id, lsm_access_group_init_type init_type, lsm_system *system, lsm_access_group **access_group, lsm_flag flags)
typedef int(* lsm_plug_access_group_delete )(lsm_plugin_ptr c, lsm_access_group *group, lsm_flag flags)
typedef int(* lsm_plug_access_group_initiator_add )(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags)
typedef int(* lsm_plug_access_group_initiator_delete )(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags)
typedef int(* lsm_plug_volume_mask )(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags)
typedef int(* lsm_plug_volume_unmask )(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags)
typedef int(* lsm_plug_volumes_accessible_by_access_group )(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume **volumes[], uint32_t *count, lsm_flag flags)
typedef int(* lsm_plug_access_groups_granted_to_volume )(lsm_plugin_ptr c, lsm_volume *volume, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags)
typedef int(* lsm_plug_volume_child_dependency )(lsm_plugin_ptr c, lsm_volume *volume, uint8_t *yes, lsm_flag flags)
typedef int(* lsm_plug_volume_child_dependency_delete )(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_fs **fs[], uint32_t *fs_count, lsm_flag flags)
typedef int(* lsm_plug_fs_create )(lsm_plugin_ptr c, lsm_pool *pool, const char *name, uint64_t size_bytes, lsm_fs **fs, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_delete )(lsm_plugin_ptr c, lsm_fs *fs, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_clone )(lsm_plugin_ptr c, lsm_fs *src_fs, const char *dest_fs_name, lsm_fs **cloned_fs, lsm_fs_ss *optional_snapshot, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_child_dependency )(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, uint8_t *yes)
typedef int(* lsm_plug_fs_child_dependency_delete )(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_resize )(lsm_plugin_ptr c, lsm_fs *fs, uint64_t new_size_bytes, lsm_fs **rfs, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_file_clone )(lsm_plugin_ptr c, lsm_fs *fs, const char *src_file_name, const char *dest_file_name, lsm_fs_ss *snapshot, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_ss_list )(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss **ss[], uint32_t *ss_count, lsm_flag flags)
typedef int(* lsm_plug_fs_ss_create )(lsm_plugin_ptr c, lsm_fs *fs, const char *name, lsm_fs_ss **snapshot, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_ss_delete )(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, char **job, lsm_flag flags)
typedef int(* lsm_plug_fs_ss_restore )(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, lsm_string_list *files, lsm_string_list *restore_files, int all_files, char **job, lsm_flag flags)
typedef int(* lsm_plug_nfs_auth_types )(lsm_plugin_ptr c, lsm_string_list **types, lsm_flag flags)
typedef int(* lsm_plug_nfs_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_nfs_export **exports[], uint32_t *count, lsm_flag flags)
typedef int(* lsm_plug_nfs_export_fs )(lsm_plugin_ptr c, const char *fs_id, const char *export_path, lsm_string_list *root_list, lsm_string_list *rw_list, lsm_string_list *ro_list, uint64_t anon_uid, uint64_t anon_gid, const char *auth_type, const char *options, lsm_nfs_export **exported, lsm_flag flags)
typedef int(* lsm_plug_nfs_export_remove )(lsm_plugin_ptr c, lsm_nfs_export *e, lsm_flag flags)
typedef int(* lsm_plug_volume_raid_info )(lsm_plugin_ptr c, lsm_volume *volume, lsm_volume_raid_type *raid_type, uint32_t *strip_size, uint32_t *disk_count, uint32_t *min_io_size, uint32_t *opt_io_size, lsm_flag flags)
typedef int(* lsm_plug_pool_member_info )(lsm_plugin_ptr c, lsm_pool *pool, lsm_volume_raid_type *raid_type, lsm_pool_member_type *member_type, lsm_string_list **member_ids, lsm_flag flags)
typedef int(* lsm_plug_volume_raid_create_cap_get )(lsm_plugin_ptr c, lsm_system *system, uint32_t **supported_raid_types, uint32_t *supported_raid_type_count, uint32_t **supported_strip_sizes, uint32_t *supported_strip_size_count, lsm_flag flags)
typedef int(* lsm_plug_volume_raid_create )(lsm_plugin_ptr c, const char *name, lsm_volume_raid_type raid_type, lsm_disk *disks[], uint32_t disk_count, uint32_t strip_size, lsm_volume **new_volume, lsm_flag flags)

Enumerations

enum  lsm_data_type {
  LSM_DATA_TYPE_UNKNOWN = -1, LSM_DATA_TYPE_NONE, LSM_DATA_TYPE_ACCESS_GROUP, LSM_DATA_TYPE_BLOCK_RANGE,
  LSM_DATA_TYPE_FS, LSM_DATA_TYPE_NFS_EXPORT, LSM_DATA_TYPE_POOL, LSM_DATA_TYPE_SS,
  LSM_DATA_TYPE_STRING_LIST, LSM_DATA_TYPE_SYSTEM, LSM_DATA_TYPE_VOLUME, LSM_DATA_TYPE_DISK
}

Functions

void LSM_DLL_EXPORT * lsm_data_type_copy (lsm_data_type t, void *item)
int LSM_DLL_EXPORT lsm_plugin_init_v1 (int argc, char *argv[], lsm_plugin_register reg, lsm_plugin_unregister unreg, const char *desc, const char *version)
int LSM_DLL_EXPORT lsm_register_plugin_v1 (lsm_plugin_ptr plug, void *private_data, struct lsm_mgmt_ops_v1 *mgm_ops, struct lsm_san_ops_v1 *san_ops, struct lsm_fs_ops_v1 *fs_ops, struct lsm_nas_ops_v1 *nas_ops)
int LSM_DLL_EXPORT lsm_register_plugin_v1_2 (lsm_plugin_ptr plug, void *private_data, struct lsm_mgmt_ops_v1 *mgm_ops, struct lsm_san_ops_v1 *san_ops, struct lsm_fs_ops_v1 *fs_ops, struct lsm_nas_ops_v1 *nas_ops, struct lsm_ops_v1_2 *ops_v1_2)
void LSM_DLL_EXPORT * lsm_private_data_get (lsm_plugin_ptr plug)
int LSM_DLL_EXPORT lsm_log_error_basic (lsm_plugin_ptr plug, lsm_error_number code, const char *msg)
int LSM_DLL_EXPORT lsm_plugin_error_log (lsm_plugin_ptr plug, lsm_error_ptr error)
lsm_error_ptr LSM_DLL_EXPORT lsm_error_create (lsm_error_number code, const char *msg, const char *exception, const char *debug, const void *debug_data, uint32_t debug_data_size)
lsm_pool LSM_DLL_EXPORT ** lsm_pool_record_array_alloc (uint32_t size)
void LSM_DLL_EXPORT lsm_pool_free_space_set (lsm_pool *p, uint64_t free_space)
lsm_pool LSM_DLL_EXPORT * lsm_pool_record_alloc (const char *id, const char *name, uint64_t element_type, uint64_t unsupported_actions, uint64_t total_space, uint64_t free_space, uint64_t status, const char *status_info, const char *system_id, const char *plugin_data)
const char LSM_DLL_EXPORT * lsm_pool_plugin_data_get (lsm_pool *p)
lsm_volume LSM_DLL_EXPORT ** lsm_volume_record_array_alloc (uint32_t size)
lsm_disk LSM_DLL_EXPORT ** lsm_disk_record_array_alloc (uint32_t size)
lsm_disk LSM_DLL_EXPORT * lsm_disk_record_alloc (const char *id, const char *name, lsm_disk_type disk_type, uint64_t block_size, uint64_t block_count, uint64_t disk_status, const char *system_id)
lsm_volume LSM_DLL_EXPORT * lsm_volume_record_alloc (const char *id, const char *name, const char *vpd83, uint64_t block_size, uint64_t number_of_blocks, uint32_t status, const char *system_id, const char *pool_id, const char *plugin_data)
const char LSM_DLL_EXPORT * lsm_volume_plugin_data_get (lsm_volume *v)
lsm_system LSM_DLL_EXPORT ** lsm_system_record_array_alloc (uint32_t size)
lsm_system LSM_DLL_EXPORT * lsm_system_record_alloc (const char *id, const char *name, uint32_t status, const char *status_info, const char *plugin_data)
const char LSM_DLL_EXPORT * lsm_system_plugin_data_get (lsm_system *s)
lsm_access_group LSM_DLL_EXPORT ** lsm_access_group_record_array_alloc (uint32_t size)
lsm_access_group LSM_DLL_EXPORT * lsm_access_group_record_alloc (const char *id, const char *name, lsm_string_list *initiators, lsm_access_group_init_type init_type, const char *system_id, const char *plugin_data)
void LSM_DLL_EXPORT lsm_access_group_initiator_id_set (lsm_access_group *group, lsm_string_list *il)
lsm_fs LSM_DLL_EXPORT * lsm_fs_record_alloc (const char *id, const char *name, uint64_t total_space, uint64_t free_space, const char *pool_id, const char *system_id, const char *plugin_data)
lsm_fs LSM_DLL_EXPORT ** lsm_fs_record_array_alloc (uint32_t size)
const char LSM_DLL_EXPORT * lsm_fs_plugin_data_get (lsm_fs *fs)
lsm_fs_ss LSM_DLL_EXPORT * lsm_fs_ss_record_alloc (const char *id, const char *name, uint64_t ts, const char *plugin_data)
lsm_fs_ss LSM_DLL_EXPORT ** lsm_fs_ss_record_array_alloc (uint32_t size)
const char LSM_DLL_EXPORT * lsm_fs_ss_plugin_data_get (lsm_fs_ss *fs_ss)
int LSM_DLL_EXPORT lsm_capability_set (lsm_storage_capabilities *cap, lsm_capability_type t, lsm_capability_value_type v)
int LSM_DLL_EXPORT lsm_capability_set_n (lsm_storage_capabilities *cap, lsm_capability_value_type v,...)
lsm_storage_capabilities
LSM_DLL_EXPORT * 
lsm_capability_record_alloc (char const *value)
int LSM_DLL_EXPORT lsm_uri_parse (const char *uri, char **scheme, char **user, char **server, int *port, char **path, lsm_hash **query_params)
void LSM_DLL_EXPORT lsm_plug_volume_search_filter (const char *search_key, const char *search_value, lsm_volume *vols[], uint32_t *count)
void LSM_DLL_EXPORT lsm_plug_pool_search_filter (const char *search_key, const char *search_value, lsm_pool *pools[], uint32_t *count)
void LSM_DLL_EXPORT lsm_plug_disk_search_filter (const char *search_key, const char *search_value, lsm_disk *disks[], uint32_t *count)
void LSM_DLL_EXPORT lsm_plug_access_group_search_filter (const char *search_key, const char *search_value, lsm_access_group *ag[], uint32_t *count)
void LSM_DLL_EXPORT lsm_plug_fs_search_filter (const char *search_key, const char *search_value, lsm_fs *fs[], uint32_t *count)
void LSM_DLL_EXPORT lsm_plug_nfs_export_search_filter (const char *search_key, const char *search_value, lsm_nfs_export *exports[], uint32_t *count)
const char LSM_DLL_EXPORT * lsm_nfs_export_plugin_data_get (lsm_nfs_export *exp)
lsm_target_port LSM_DLL_EXPORT * lsm_target_port_record_alloc (const char *id, lsm_target_port_type port_type, const char *service_address, const char *network_address, const char *physical_address, const char *physical_name, const char *system_id, const char *plugin_data)
const char LSM_DLL_EXPORT * lsm_target_port_plugin_data_get (lsm_target_port *tp)
lsm_target_port LSM_DLL_EXPORT ** lsm_target_port_record_array_alloc (uint32_t size)
void LSM_DLL_EXPORT lsm_plug_target_port_search_filter (const char *search_key, const char *search_value, lsm_target_port *tp[], uint32_t *count)

Detailed Description

Definition in file libstoragemgmt_plug_interface.h.


Define Documentation

#define LSM_ERROR_CREATE_PLUGIN_DEBUG ( code,
msg,
exception,
debug,
debug_data,
debug_len   ) 
Value:
lsm_error_create((code), (msg), (exception), (debug), \
                     (debug_data), debug_len)

Definition at line 1111 of file libstoragemgmt_plug_interface.h.

#define LSM_ERROR_CREATE_PLUGIN_EXCEPTION ( code,
msg,
exception   )     lsm_error_create((code), (msg), (exception), NULL, NULL, 0)

Definition at line 1107 of file libstoragemgmt_plug_interface.h.

#define LSM_ERROR_CREATE_PLUGIN_MSG ( code,
msg   )     lsm_error_create(code, msg, NULL, NULL, NULL, 0)

Plug-in macros for creating errors

Definition at line 1104 of file libstoragemgmt_plug_interface.h.


Typedef Documentation

typedef int(* lsm_plug_access_group_create)(lsm_plugin_ptr c, const char *name, const char *initiator_id, lsm_access_group_init_type init_type, lsm_system *system, lsm_access_group **access_group, lsm_flag flags)

Creates an access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] name Name of access group
[in] initiator_id Initiator to be added to group
[in] id_type Initiator type
[in] system System to create group for
[out] access_group Newly created access group
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 404 of file libstoragemgmt_plug_interface.h.

Deletes an access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] group Access group to be deleted
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 415 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_access_group_initiator_add)(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags)

Add an initiator to an access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] access_group Group to add initiator to
[in] initiator_id Initiator to add to group
[in] id_type Initiator type
[out] updated_access_group Updated access group
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 430 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_access_group_initiator_delete)(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags)

Remove an initiator from an access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] access_group Group to remove initiator from
[in] initiator_id Initiator to remove
[in] id_type Initiator type
[out] updated_access_group Updated access group
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 445 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_access_group_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags)

Retrieve a list of access groups, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] search_key Field to search on
[in] search_value Field value
[out] groups Array of groups
[out] group_count Number of groups
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 386 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_access_groups_granted_to_volume)(lsm_plugin_ptr c, lsm_volume *volume, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags)

Retrieve a list of access groups that have access to the specified volume, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] volume Volume to query
[out] groups Array of access groups
[out] group_count Number of access groups
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 501 of file libstoragemgmt_plug_interface.h.

Retrieve the plug-in capabilities callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] sys System to interrogate
[out] cap Capabilities
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 118 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_disk_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_disk **disk_array[], uint32_t *count, lsm_flag flags)

Retrieve a list of volumes.

Parameters:
[in] c Valid lsm plug-in pointer
[in] search_key Search key
[in] search_value Search value
[out] disk_array Array of disk pointers
[out] count Number of disks
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 217 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_child_dependency)(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, uint8_t *yes)

Determine if a file system has child dependencies, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system to check
[in] files Specific files to check
[out] yes Boolean
Returns:
LSM_ERR_OK, else error reason

Definition at line 592 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_child_dependency_delete)(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, char **job, lsm_flag flags)

Remove dependencies from a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system to remove dependencies for
[in] files Specific files to remove dependencies for
[out] job Job ID
[out] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 606 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_clone)(lsm_plugin_ptr c, lsm_fs *src_fs, const char *dest_fs_name, lsm_fs **cloned_fs, lsm_fs_ss *optional_snapshot, char **job, lsm_flag flags)

Clone a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] dest_fs_name Clone fs name
[out] cloned_fs New clone
[in] optional_snapshot Basis of clone
[out] job Job ID
[in] flags reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 579 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_create)(lsm_plugin_ptr c, lsm_pool *pool, const char *name, uint64_t size_bytes, lsm_fs **fs, char **job, lsm_flag flags)

Create a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] pool Pool to create file system from
[in] name Name of file system
[in] size_bytes Size of the file system in bytes
[out] fs Newly created file system
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 553 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_delete)(lsm_plugin_ptr c, lsm_fs *fs, char **job, lsm_flag flags)

Delete a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system to delete
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 566 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_file_clone)(lsm_plugin_ptr c, lsm_fs *fs, const char *src_file_name, const char *dest_file_name, lsm_fs_ss *snapshot, char **job, lsm_flag flags)

Clone an individual file on a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system which contains the file to clone
[in] src_file_name Source file name and path
[in] dest_file_name Destination file and path
[in] snapshot Optional backing snapshot
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 638 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_fs **fs[], uint32_t *fs_count, lsm_flag flags)

File system list, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] search_key Search key
[in] search_value Search value
[out] fs An array of file systems
[out] fs_count Number of file systems
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 536 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_resize)(lsm_plugin_ptr c, lsm_fs *fs, uint64_t new_size_bytes, lsm_fs **rfs, char **job, lsm_flag flags)

Re-size a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system to re-size
[in] new_size_bytes New size of file system
[out] rfs Re-sized file system
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 622 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_ss_create)(lsm_plugin_ptr c, lsm_fs *fs, const char *name, lsm_fs_ss **snapshot, char **job, lsm_flag flags)

Create a fs snapshot of the specified file system and optionally constrain it to a list of files, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system to create snapshot for
[in] name Snap shot name
[out] snapshot Newly created snapshot
[out] job Job ID
Returns:
LSM_ERR_OK, else error reason

Definition at line 668 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_ss_delete)(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, char **job, lsm_flag flags)

Delete a fs snapshot, callback function signature, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system to delete snapshot for
[in] ss Snapshot to delete
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 682 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_ss_list)(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss **ss[], uint32_t *ss_count, lsm_flag flags)

Retrieve a list of fs snapshots for a file system, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system
[out] ss Array of snap shots
[out] ss_count Count of snapshots
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 654 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_fs_ss_restore)(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, lsm_string_list *files, lsm_string_list *restore_files, int all_files, char **job, lsm_flag flags)

Revert the state of a file system or specific files to a previous state, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs File system of interest
[in] files Optional list of files
[in] restore_files Optional path and name of restored files
[in] all_files boolean to indicate all files should be restored
[out] job Job ID
Returns:
LSM_ERR_OK, else error reason

Definition at line 698 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_iscsi_chap_auth)(lsm_plugin_ptr c, const char *init_id, const char *in_user, const char *in_password, const char *out_user, const char *out_password, lsm_flag flags)

Setup the cap authentication for the specified initiator, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] init_id Initiator to set chap authentication for
[in] in_user CHAP inbound username
[in] in_password CHAP inbound password
[in] out_user CHAP outbound user name
[in] out_password CHAP outbound user name
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 368 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_job_free)(lsm_plugin_ptr c, char *job_id, lsm_flag flags)

Instructs the plug-in to release the memory for the specified job id, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] job_id Job ID to free memory for
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 147 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_Job_status)(lsm_plugin_ptr c, const char *job, lsm_job_status *status, uint8_t *percent_complete, lsm_data_type *type, void **value, lsm_flag flags)

Retrieve the job status callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] job Job identifier
[out] status Enumerated value representing status
[out] percent_complete How far completed
[out] type Type of result
[out] value Value of result
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 134 of file libstoragemgmt_plug_interface.h.

Get a list of NFS client authentication types, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[out] types List of authtication types
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 712 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_nfs_export_fs)(lsm_plugin_ptr c, const char *fs_id, const char *export_path, lsm_string_list *root_list, lsm_string_list *rw_list, lsm_string_list *ro_list, uint64_t anon_uid, uint64_t anon_gid, const char *auth_type, const char *options, lsm_nfs_export **exported, lsm_flag flags)

Exports a file system via NFS, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] fs_id File system id to export
[in] export_path NFS export path
[in] root_list List of servers with root access
[in] rw_list List of servers with read/write access
[in] ro_list List of servers with read only access
[in] anon_uid UID to be mapped to anonymous
[in] anon_gid GID to be mapped to anonymous
[in] auth_type Client authentication type
[in] options Options
[out] exported Newly created export
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 747 of file libstoragemgmt_plug_interface.h.

Removes a NFS export, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] e Export to remove
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 767 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_nfs_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_nfs_export **exports[], uint32_t *count, lsm_flag flags)

Retrieve a list of NFS exports, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] search_key Search key
[in] search_value Search value
[out] exports An array of exported file systems
[out] count Number of exported file systems
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 726 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_pool_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_pool **pool_array[], uint32_t *count, lsm_flag flags)

Retrieves a list of pools callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] search_key Search key
[in] search_value Search value
[out] pool_array List of pools
[out] count Number of items in array
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 160 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_pool_member_info)(lsm_plugin_ptr c, lsm_pool *pool, lsm_volume_raid_type *raid_type, lsm_pool_member_type *member_type, lsm_string_list **member_ids, lsm_flag flags)

Retrieves the membership of given pool. New in version 1.2.

Parameters:
[in] c Valid lsm plug-in pointer
[in] pool The lsm_pool ptr.
[out] raid_type Enum of lsm_volume_raid_type.
[out] member_type Enum of lsm_pool_member_type.
[out] member_ids The pointer of lsm_string_list pointer. When 'member_type' is LSM_POOL_MEMBER_TYPE_POOL, the 'member_ids' will contain a list of parent Pool IDs. When 'member_type' is LSM_POOL_MEMBER_TYPE_DISK, the 'member_ids' will contain a list of disk IDs. When 'member_type' is LSM_POOL_MEMBER_TYPE_OTHER or LSM_POOL_MEMBER_TYPE_UNKNOWN, the member_ids should be NULL.
[in] flags Reserved, set to 0
Returns:
LSM_ERR_OK on success else error reason.

Definition at line 918 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_system_list)(lsm_plugin_ptr c, lsm_system **systems[], uint32_t *system_count, lsm_flag flags)

Retrieve a list of systems, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[out] systems List of systems
[out] system_count Number of systems
[out] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 174 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_target_port_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_target_port **target_port_array[], uint32_t *count, lsm_flag flags)

Retrieve a list of target ports.

Parameters:
[in] c Valid lsm plugin-in pointer
[in] search_key Search key
[in] search_value Search value
[out] target_port_array Array of target port pointers
[out] count Number of target ports
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 234 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_tmo_get)(lsm_plugin_ptr c, uint32_t *timeout, lsm_flag flags)

Get the plug-in time-out value callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[out] timeout Time-out value
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 107 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_tmo_set)(lsm_plugin_ptr c, uint32_t timeout, lsm_flag flags)

Set plug-in time-out value callback function signature

Parameters:
c Valid lsm plug-in pointer
timeout timeout value in milliseconds
flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 97 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_child_dependency)(lsm_plugin_ptr c, lsm_volume *volume, uint8_t *yes, lsm_flag flags)

Determine if a volume has child dependencies, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] volume Volume to query
[out] yes Boolean
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 513 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_child_dependency_delete)(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags)

Remove dependencies from a volume, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] volume Volume to remove dependency for
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 524 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_create)(lsm_plugin_ptr c, lsm_pool *pool, const char *volume_name, uint64_t size, lsm_volume_provision_type provisioning, lsm_volume **new_volume, char **job, lsm_flag flags)

Creates a volume, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] pool Pool to allocated storage from
[in] volume_name Name of new volume
[in] size Size of volume in bytes
[in] provisioning How provisioned
[out] new_volume Information on newly created volume
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 249 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_delete)(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags)

Delete a volume, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] volume Volume to be deleted
[out] job Job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 333 of file libstoragemgmt_plug_interface.h.

Take a volume offline, callback function signature.

Parameters:
[in] c Valid lsm plug-in pointer
v 
flags 
Returns:
LSM_ERR_OK, else error reason

Definition at line 353 of file libstoragemgmt_plug_interface.h.

Place a volume online, callback function signature.

Parameters:
[in] c Valid lsm plug-in pointer
[in] v Volume to place online
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 343 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_list)(lsm_plugin_ptr c, const char *search_key, const char *search_val, lsm_volume **vol_array[], uint32_t *count, lsm_flag flags)

Retrieve a list of volumes.

Parameters:
[in] c Valid lsm plug-in pointer
[in] search_key Search key
[in] search_value Search value
[out] vol_array Array of volumes
[out] count Number of volumes
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 201 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_mask)(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags)

Grants access to a volume for the specified access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] group Group to be granted access
[in] volume Volume to be given access too
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 458 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_raid_create)(lsm_plugin_ptr c, const char *name, lsm_volume_raid_type raid_type, lsm_disk *disks[], uint32_t disk_count, uint32_t strip_size, lsm_volume **new_volume, lsm_flag flags)

Create a disk RAID pool and allocate entire full space to new volume. New in version 1.2, only available for hardware RAID cards.

Parameters:
[in] c Valid lsm plug-in pointer
[in] name String. Name for the new volume. It might be ignored or altered on some hardwardware raid cards in order to fit their limitation.
[in] raid_type Enum of lsm_volume_raid_type.
[in] disks An array of lsm_disk types
[in] disk_count The count of lsm_disk in 'disks' argument.
[in] strip_size uint32_t. The strip size in bytes.
[out] new_volume Newly created volume, Pointer to the lsm_volume type pointer.
[in] flags Reserved, set to 0
Returns:
LSM_ERR_OK on success else error reason.

Definition at line 972 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_raid_create_cap_get)(lsm_plugin_ptr c, lsm_system *system, uint32_t **supported_raid_types, uint32_t *supported_raid_type_count, uint32_t **supported_strip_sizes, uint32_t *supported_strip_size_count, lsm_flag flags)

Query all supported RAID types and strip sizes which could be used in lsm_volume_raid_create() functions. New in version 1.2, only available for hardware RAID cards.

Parameters:
[in] c Valid lsm plug-in pointer
[in] system The lsm_sys type.
[out] supported_raid_types The pointer of uint32_t array. Containing lsm_volume_raid_type values.
[out] supported_raid_type_count The pointer of uint32_t. Indicate the item count of supported_raid_types array.
[out] supported_strip_sizes The pointer of uint32_t array. Containing all supported strip sizes.
[out] supported_strip_size_count The pointer of uint32_t. Indicate the item count of supported_strip_sizes array.
[in] flags Reserved, set to 0
Returns:
LSM_ERR_OK on success else error reason.

Definition at line 947 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_raid_info)(lsm_plugin_ptr c, lsm_volume *volume, lsm_volume_raid_type *raid_type, uint32_t *strip_size, uint32_t *disk_count, uint32_t *min_io_size, uint32_t *opt_io_size, lsm_flag flags)

Query the RAID information of a volume

Parameters:
[in] c Valid lsm plug-in pointer
[in] volume Volume to be deleted
[out] raid_type Enum of lsm_volume_raid_type
[out] strip_size Size of the strip on each disk or other storage extent.
[out] disk_count Count of of disks of RAID group(s) where this volume allocated from.
[out] min_io_size Minimum I/O size, also the preferred I/O size of random I/O.
[out] opt_io_size Optimal I/O size, also the preferred I/O size of sequential I/O.
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 888 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_replicate)(lsm_plugin_ptr c, lsm_pool *pool, lsm_replication_type rep_type, lsm_volume *volume_src, const char *name, lsm_volume **new_replicant, char **job, lsm_flag flags)

Volume replicate, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] pool Pool to allocated replicant from (optional)
[in] rep_type Replication type
[in] volume_src Source of the replication
[in] name Name of newly replicated volume
[out] new_replicant Newly replicated volume
job 
flags 
Returns:
LSM_ERR_OK, else error reason

Definition at line 269 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_replicate_range)(lsm_plugin_ptr c, lsm_replication_type rep_type, lsm_volume *source, lsm_volume *dest, lsm_block_range **ranges, uint32_t num_ranges, char **job, lsm_flag flags)

Replicate a range of a volume to the same volume or different volume.

Parameters:
[in] c Valid lsm plug-in pointer
[in] rep_type What type of replication
[in] source Source of the replication
[in] dest Destination of the replication, can be same as source
[in] ranges An array of ranges
[in] num_ranges Number of items in array
[out] job Job ID
flags 
Returns:
LSM_ERR_OK, else error reason

Definition at line 301 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_replicate_range_block_size)(lsm_plugin_ptr c, lsm_system *system, uint32_t *bs, lsm_flag flags)

Return the block size of a replicated block range.

Parameters:
[in] c Valid lsm plug-in pointer
[in] system System to query against
[out] bs Block size
[out] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 286 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_resize)(lsm_plugin_ptr c, lsm_volume *volume, uint64_t new_size, lsm_volume **resized_volume, char **job, lsm_flag flags)

Re-size a volume, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] volume Volume to be re-sized
[in] new_size New size of volume in bytes
[in] resized_volume Information about newly re-sized volume
[out] job The job ID
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 319 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volume_unmask)(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags)

Revokes access to a volume for a specified access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] group Group to revoke access for
[in] volume Volume to which will no longer be accessible by group
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 472 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plug_volumes_accessible_by_access_group)(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume **volumes[], uint32_t *count, lsm_flag flags)

Retrieve an array of volumes which are accessible by access group, callback function signature

Parameters:
[in] c Valid lsm plug-in pointer
[in] group Group to find volumes for
[out] volumes Array of volumes
[out] count Number of volumes
[in] flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 487 of file libstoragemgmt_plug_interface.h.

typedef struct _lsm_plugin lsm_plugin

Opaque data type for plug-ins

Definition at line 62 of file libstoragemgmt_plug_interface.h.

Typedef for pointer type

Definition at line 67 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plugin_register)(lsm_plugin_ptr c, const char *uri, const char *password, uint32_t timeout, lsm_flag flags)

Plug-in register callback function signature.

Parameters:
c Valid lsm plugin pointer
uri Connection URI
password Plain text password
timeout Plug-in timeout to array
flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 78 of file libstoragemgmt_plug_interface.h.

typedef int(* lsm_plugin_unregister)(lsm_plugin_ptr c, lsm_flag flags)

Plug-in unregister callback function signature

Parameters:
c Valid lsm plugin pointer
flags Reserved
Returns:
LSM_ERR_OK, else error reason

Definition at line 88 of file libstoragemgmt_plug_interface.h.


Enumeration Type Documentation

What type of data structure we have

Enumerator:
LSM_DATA_TYPE_UNKNOWN 

Unknown

LSM_DATA_TYPE_NONE 

None

LSM_DATA_TYPE_ACCESS_GROUP 

Access group

LSM_DATA_TYPE_BLOCK_RANGE 

Block range

LSM_DATA_TYPE_FS 

File system

LSM_DATA_TYPE_NFS_EXPORT 

NFS export

LSM_DATA_TYPE_POOL 

Pool

LSM_DATA_TYPE_SS 

Snap shot

LSM_DATA_TYPE_STRING_LIST 

String list

LSM_DATA_TYPE_SYSTEM 

System

LSM_DATA_TYPE_VOLUME 

Volume

LSM_DATA_TYPE_DISK 

Disk

Definition at line 44 of file libstoragemgmt_plug_interface.h.


Function Documentation

void LSM_DLL_EXPORT lsm_access_group_initiator_id_set ( lsm_access_group group,
lsm_string_list il 
)

Use to change the list of initiators associated with an access group.

Parameters:
group Access group to change initiators for
il String list of initiators.
lsm_access_group LSM_DLL_EXPORT* lsm_access_group_record_alloc ( const char *  id,
const char *  name,
lsm_string_list initiators,
lsm_access_group_init_type  init_type,
const char *  system_id,
const char *  plugin_data 
)

Allocates storage for single Access_group

Parameters:
id ID of access group
name Name of access group
initiators List of initiators, can be NULL
init_type Initiator group type
system_id System id
plugin_data Reserved for plug-in use only
Returns:
NULL on error, else valid lsm_access_group pointer.

Here is the caller graph for this function:

lsm_access_group LSM_DLL_EXPORT** lsm_access_group_record_array_alloc ( uint32_t  size  ) 

Allocates storage for Access_group array

Parameters:
size Number of elements to store.
Returns:
NULL on error, else pointer to array for use.

Here is the caller graph for this function:

lsm_storage_capabilities LSM_DLL_EXPORT* lsm_capability_record_alloc ( char const *  value  ) 

Allocated storage for capabilities

Parameters:
value Set to NULL, used during serialization otherwise.
Returns:
Allocated record, or NULL on memory allocation failure.

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_capability_set ( lsm_storage_capabilities cap,
lsm_capability_type  t,
lsm_capability_value_type  v 
)

Set a capability

Parameters:
cap Valid capability pointer
t Which capability to set
v Value of the capability
Returns:
LSM_ERR_OK on success, else error reason.
int LSM_DLL_EXPORT lsm_capability_set_n ( lsm_storage_capabilities cap,
lsm_capability_value_type  v,
  ... 
)

Sets 1 or more capabilities with the same value v

Parameters:
cap Valid capability pointer
v The value to set capabilities to
... Which capabilites to set (Make sure to terminate list with a -1)
Returns:
LSM_ERR_OK on success, else error reason
void LSM_DLL_EXPORT* lsm_data_type_copy ( lsm_data_type  t,
void *  item 
)

Copies the memory pointed to by item with given type t.

Parameters:
t Type of item to copy
item Pointer to src
Returns:
Null, else copy of item.

Definition at line 56 of file lsm_plugin_ipc.cpp.

Here is the call graph for this function:

lsm_disk LSM_DLL_EXPORT* lsm_disk_record_alloc ( const char *  id,
const char *  name,
lsm_disk_type  disk_type,
uint64_t  block_size,
uint64_t  block_count,
uint64_t  disk_status,
const char *  system_id 
)

Allocate a disk record.

Parameters:
id Identification
name Human readable name
disk_type Enumerated disk type
block_size Number of bytes per logical block
block_count Number of blocks for disk
disk_status Status
system_id System id this disk resides in
Returns:
Pointer to allocated disk record or NULL on memory error.

Here is the caller graph for this function:

lsm_disk LSM_DLL_EXPORT** lsm_disk_record_array_alloc ( uint32_t  size  ) 

Allocate the storage needed for tan array of disk records.

Parameters:
size Number of elements
Returns:
Allocated memory or null on error.

Here is the caller graph for this function:

lsm_error_ptr LSM_DLL_EXPORT lsm_error_create ( lsm_error_number  code,
const char *  msg,
const char *  exception,
const char *  debug,
const void *  debug_data,
uint32_t  debug_data_size 
)

Creates an error record.

Parameters:
code 
msg 
exception 
debug 
debug_data 
debug_data_size 
Returns:
Null on error, else valid error error record.

Definition at line 335 of file lsm_datatypes.cpp.

Here is the caller graph for this function:

const char LSM_DLL_EXPORT* lsm_fs_plugin_data_get ( lsm_fs fs  ) 

Used to retrieve the plug-in private data for a specific pool

Parameters:
fs FS to retrieve plug-in private data for
Returns:
NULL if doesn't exist, else data.
lsm_fs LSM_DLL_EXPORT* lsm_fs_record_alloc ( const char *  id,
const char *  name,
uint64_t  total_space,
uint64_t  free_space,
const char *  pool_id,
const char *  system_id,
const char *  plugin_data 
)

Allocates memory for a file system record

Parameters:
id ID of file system
name Name of file system
total_space Total space
free_space Free space
pool_id Pool id
system_id System id
plugin_data Reserved for plug-in use only
Returns:
lsm_fs, NULL on error

Here is the caller graph for this function:

lsm_fs LSM_DLL_EXPORT** lsm_fs_record_array_alloc ( uint32_t  size  ) 

Allocates the memory for the array of file system records.

Parameters:
size Number of elements
Returns:
Allocated memory, NULL on error

Here is the caller graph for this function:

const char LSM_DLL_EXPORT* lsm_fs_ss_plugin_data_get ( lsm_fs_ss fs_ss  ) 

Retrieve private data from fs_ss.

Parameters:
fs_ss Valid fs_ss record
Returns:
Private data, else NULL
lsm_fs_ss LSM_DLL_EXPORT* lsm_fs_ss_record_alloc ( const char *  id,
const char *  name,
uint64_t  ts,
const char *  plugin_data 
)

Allocates the memory for single snap shot record.

Parameters:
id ID
name Name
ts Epoch time stamp when snapshot was created
plugin_data Private plugin data
Returns:
Allocated memory, NULL on error

Here is the caller graph for this function:

lsm_fs_ss LSM_DLL_EXPORT** lsm_fs_ss_record_array_alloc ( uint32_t  size  ) 

Allocates the memory for an array of snapshot records.

Parameters:
size Number of elements
Returns:
Allocated memory, NULL on error

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_log_error_basic ( lsm_plugin_ptr  plug,
lsm_error_number  code,
const char *  msg 
)

Logs an error with the plug-in

Parameters:
plug Plug-in pointer
code Error code to return
msg String message
Returns:
returns code

Definition at line 2489 of file lsm_plugin_ipc.cpp.

Here is the call graph for this function:

const char LSM_DLL_EXPORT* lsm_nfs_export_plugin_data_get ( lsm_nfs_export exp  ) 

Retrieve private data from nfs export record.

Parameters:
exp Valid nfs export record
Returns:
Private data, else NULL
void LSM_DLL_EXPORT lsm_plug_access_group_search_filter ( const char *  search_key,
const char *  search_value,
lsm_access_group ag[],
uint32_t *  count 
)

Provides for access group filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] ag Array to filter
[in,out] count Number of access groups to filter, number remain

Definition at line 2736 of file lsm_plugin_ipc.cpp.

void LSM_DLL_EXPORT lsm_plug_disk_search_filter ( const char *  search_key,
const char *  search_value,
lsm_disk disks[],
uint32_t *  count 
)

Provides for disk filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] disks Array to filter
[in,out] count Number of disks to filter, number remain

Definition at line 2708 of file lsm_plugin_ipc.cpp.

void LSM_DLL_EXPORT lsm_plug_fs_search_filter ( const char *  search_key,
const char *  search_value,
lsm_fs fs[],
uint32_t *  count 
)

Provides for fs filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] fs Array to filter
[in,out] count Number of file systems to filter, number remain

Definition at line 2763 of file lsm_plugin_ipc.cpp.

void LSM_DLL_EXPORT lsm_plug_nfs_export_search_filter ( const char *  search_key,
const char *  search_value,
lsm_nfs_export exports[],
uint32_t *  count 
)

Provides for nfs filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] exports Array to filter
[in,out] count Number of nfs exports to filter, number remain

Definition at line 2789 of file lsm_plugin_ipc.cpp.

void LSM_DLL_EXPORT lsm_plug_pool_search_filter ( const char *  search_key,
const char *  search_value,
lsm_pool pools[],
uint32_t *  count 
)

Provides for pool filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] pools Array to filter
[in,out] count Number of pools to filter, number remain

Definition at line 2682 of file lsm_plugin_ipc.cpp.

void LSM_DLL_EXPORT lsm_plug_target_port_search_filter ( const char *  search_key,
const char *  search_value,
lsm_target_port *  tp[],
uint32_t *  count 
)

Provides for target port filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] tp Array to filter
[in,out] count Number of target ports to filter, number remain
void LSM_DLL_EXPORT lsm_plug_volume_search_filter ( const char *  search_key,
const char *  search_value,
lsm_volume vols[],
uint32_t *  count 
)

Provides for volume filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.

Parameters:
search_key Search field
search_value Search value
[in,out] vols Array to filter
[in,out] count Number of volumes to filter, number remain

Definition at line 2654 of file lsm_plugin_ipc.cpp.

int LSM_DLL_EXPORT lsm_plugin_error_log ( lsm_plugin_ptr  plug,
lsm_error_ptr  error 
)

Return an error with the plug-in

Parameters:
plug Opaque plug-in
error Error to associate.
Returns:
LSM_ERR_OK, else error reason.

Definition at line 2510 of file lsm_plugin_ipc.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_plugin_init_v1 ( int  argc,
char *  argv[],
lsm_plugin_register  reg,
lsm_plugin_unregister  unreg,
const char *  desc,
const char *  version 
)

Initializes the plug-in.

Parameters:
argc Command line argument count
argv Command line arguments
reg Registration function
unreg Un-Registration function
desc Plug-in description
version Plug-in version
Returns:
exit code for plug-in

Definition at line 267 of file lsm_plugin_ipc.cpp.

Here is the caller graph for this function:

void LSM_DLL_EXPORT lsm_pool_free_space_set ( lsm_pool p,
uint64_t  free_space 
)

Used to set the free space on a pool record

Parameters:
p Pool to modify
free_space New free space value

Definition at line 522 of file lsm_datatypes.cpp.

Here is the caller graph for this function:

const char LSM_DLL_EXPORT* lsm_pool_plugin_data_get ( lsm_pool p  ) 

Used to retrieve the plugin-private data for a specfic pool

Parameters:
p Pool to retrieve plugin private data for
Returns:
NULL if donesn't exists, else data.
lsm_pool LSM_DLL_EXPORT* lsm_pool_record_alloc ( const char *  id,
const char *  name,
uint64_t  element_type,
uint64_t  unsupported_actions,
uint64_t  total_space,
uint64_t  free_space,
uint64_t  status,
const char *  status_info,
const char *  system_id,
const char *  plugin_data 
)

Helper function to allocate a pool record.

Parameters:
id System unique identifier
name Human readable name
element_type A bit field which states what the pool can be used to create
unsupported_actions Things you cannot do with this pool
total_space Total space
free_space Space available
status Pool status, bit field (See LSM_POOL_STATUS_XXXX constants)
status_info Additional textual information on status
system_id System id
plugin_data Reserved for plugin writer use
Returns:
LSM_ERR_OK on success, else error reason.

Definition at line 489 of file lsm_datatypes.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_pool LSM_DLL_EXPORT** lsm_pool_record_array_alloc ( uint32_t  size  ) 

Helper function to create an array of lsm_pool *

Parameters:
size Number of elements
Returns:
Valid pointer or NULL on error.

Here is the caller graph for this function:

void LSM_DLL_EXPORT* lsm_private_data_get ( lsm_plugin_ptr  plug  ) 

Used to retrieve private data for plug-in operation.

Parameters:
plug Opaque plug-in pointer.

Definition at line 144 of file lsm_plugin_ipc.cpp.

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_register_plugin_v1 ( lsm_plugin_ptr  plug,
void *  private_data,
struct lsm_mgmt_ops_v1 mgm_ops,
struct lsm_san_ops_v1 san_ops,
struct lsm_fs_ops_v1 fs_ops,
struct lsm_nas_ops_v1 nas_ops 
)

Used to register all the data needed for the plug-in operation.

Parameters:
plug Pointer provided by the framework
private_data Private data to be used for whatever the plug-in needs
mgm_ops Function pointers for management operations
san_ops Function pointers for SAN operations
fs_ops Function pointers for file system operations
nas_ops Function pointers for NAS operations
Returns:
LSM_ERR_OK on success, else error reason.

Definition at line 107 of file lsm_plugin_ipc.cpp.

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_register_plugin_v1_2 ( lsm_plugin_ptr  plug,
void *  private_data,
struct lsm_mgmt_ops_v1 mgm_ops,
struct lsm_san_ops_v1 san_ops,
struct lsm_fs_ops_v1 fs_ops,
struct lsm_nas_ops_v1 nas_ops,
struct lsm_ops_v1_2 ops_v1_2 
)

Used to register version 1.2 APIs plug-in operation.

Parameters:
plug Pointer provided by the framework
private_data Private data to be used for whatever the plug-in needs
mgm_ops Function pointers for struct lsm_mgmt_ops_v1
san_ops Function pointers for struct lsm_san_ops_v1
fs_ops Function pointers for struct lsm_fs_ops_v1
nas_ops Function pointers for struct lsm_nas_ops_v1
ops_v1_2 Function pointers for struct lsm_ops_v1_2
Returns:
LSM_ERR_OK on success, else error reason.

Definition at line 127 of file lsm_plugin_ipc.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const char LSM_DLL_EXPORT* lsm_system_plugin_data_get ( lsm_system s  ) 

Retrieve plugin private data

Parameters:
s System
Returns:
Optional data, NULL if none exist
lsm_system LSM_DLL_EXPORT* lsm_system_record_alloc ( const char *  id,
const char *  name,
uint32_t  status,
const char *  status_info,
const char *  plugin_data 
)

Allocates the storage for one system record.

Parameters:
[in] id Id
[in] name System name (human readable)
[in] status Status of the system
[in] status_info Additional text for status
[in] plugin_data Private plugin data
Returns:
Allocated memory or NULL on error.

Here is the caller graph for this function:

lsm_system LSM_DLL_EXPORT** lsm_system_record_array_alloc ( uint32_t  size  ) 

Allocate the storage needed for and array of System records.

Parameters:
size Number of elements.
Returns:
Allocated memory or NULL on error.

Here is the caller graph for this function:

const char LSM_DLL_EXPORT* lsm_target_port_plugin_data_get ( lsm_target_port *  tp  ) 

Retrieve the plug-in private data pointer

Parameters:
tp Valid target port pointer
Returns:
Character pointer to string, NULL on error
lsm_target_port LSM_DLL_EXPORT* lsm_target_port_record_alloc ( const char *  id,
lsm_target_port_type  port_type,
const char *  service_address,
const char *  network_address,
const char *  physical_address,
const char *  physical_name,
const char *  system_id,
const char *  plugin_data 
)

Allocate a target port

Parameters:
id ID of target port
port_type Port type
service_address Service address
network_address Network Address
physical_address Physical address
physical_name Physical name
system_id System ID
plugin_data Plug-in data
Returns:
valid lsm_target_port, else NULL on memory allocation failure

Here is the caller graph for this function:

lsm_target_port LSM_DLL_EXPORT** lsm_target_port_record_array_alloc ( uint32_t  size  ) 

Allocated an array of target pointers

Parameters:
size Number of pointers to store
Returns:
Allocated memory, NULL on allocation errors

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_uri_parse ( const char *  uri,
char **  scheme,
char **  user,
char **  server,
int *  port,
char **  path,
lsm_hash **  query_params 
)

Convenience function for plug-in writer. Note: Make sure to free returned items to prevent memory leaks.

Parameters:
[in] uri URI to parse
[out] scheme returned scheme
[out] user returned user
[out] server returned server
[out] port returned port
[out] path returned path
[out] query_params returned query params
Returns:
LSM_ERR_OK on successful parse, else error reason.

Definition at line 2537 of file lsm_plugin_ipc.cpp.

Here is the call graph for this function:

const char LSM_DLL_EXPORT* lsm_volume_plugin_data_get ( lsm_volume v  ) 

Retrieve the private plug-in data from the volume record.

Parameters:
v Volume pointer
Returns:
Private data, else NULL if it doesn't exist.
lsm_volume LSM_DLL_EXPORT* lsm_volume_record_alloc ( const char *  id,
const char *  name,
const char *  vpd83,
uint64_t  block_size,
uint64_t  number_of_blocks,
uint32_t  status,
const char *  system_id,
const char *  pool_id,
const char *  plugin_data 
)

Allocated the storage needed for one volume record.

Parameters:
id ID
name Name
vpd83 SCSI vpd 83 id
block_size Volume block size
number_of_blocks Volume number of blocks
status Volume status
system_id System id
pool_id Pool id this volume is created from
plugin_data Private data for plugin use
Returns:
Allocated memory or NULL on error.

Here is the caller graph for this function:

lsm_volume LSM_DLL_EXPORT** lsm_volume_record_array_alloc ( uint32_t  size  ) 

Allocate the storage needed for and array of Volume records.

Parameters:
size Number of elements.
Returns:
Allocated memory or NULL on error.

Here is the caller graph for this function:


Generated on 9 Jul 2015 for libStorageMgmt by  doxygen 1.6.1