lsm_convert.hpp File Reference

#include "lsm_datatypes.hpp"
#include "lsm_ipc.hpp"
Include dependency graph for lsm_convert.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define IS_CLASS(x, name)   is_expected_object(x, name)
#define IS_CLASS_SYSTEM(x)   IS_CLASS(x, CLASS_NAME_SYSTEM)
#define IS_CLASS_POOL(x)   IS_CLASS(x, CLASS_NAME_POOL)
#define IS_CLASS_VOLUME(x)   IS_CLASS(x, CLASS_NAME_VOLUME)
#define IS_CLASS_BLOCK_RANGE(x)   IS_CLASS(x, CLASS_NAME_BLOCK_RANGE)
#define IS_CLASS_ACCESS_GROUP(x)   IS_CLASS(x, CLASS_NAME_ACCESS_GROUP)
#define IS_CLASS_FILE_SYSTEM(x)   IS_CLASS(x, CLASS_NAME_FILE_SYSTEM)
#define IS_CLASS_FS_SNAPSHOT(x)   IS_CLASS(x, CLASS_NAME_FS_SNAPSHOT)
#define IS_CLASS_FS_EXPORT(x)   IS_CLASS(x, CLASS_NAME_FS_EXPORT)

Functions

bool LSM_DLL_LOCAL is_expected_object (Value &obj, std::string class_name)
lsm_string_list LSM_DLL_LOCAL * value_to_string_list (Value &list)
Value LSM_DLL_LOCAL string_list_to_value (lsm_string_list *sl)
lsm_volume LSM_DLL_LOCAL * value_to_volume (Value &vol)
Value LSM_DLL_LOCAL volume_to_value (lsm_volume *vol)
int LSM_DLL_LOCAL value_array_to_volumes (Value &volume_values, lsm_volume **volumes[], uint32_t *count)
lsm_disk LSM_DLL_LOCAL * value_to_disk (Value &disk)
Value LSM_DLL_LOCAL disk_to_value (lsm_disk *disk)
int LSM_DLL_LOCAL value_array_to_disks (Value &disk_values, lsm_disk **disks[], uint32_t *count)
lsm_pool LSM_DLL_LOCAL * value_to_pool (Value &pool)
Value LSM_DLL_LOCAL pool_to_value (lsm_pool *pool)
lsm_system LSM_DLL_LOCAL * value_to_system (Value &system)
Value LSM_DLL_LOCAL system_to_value (lsm_system *system)
lsm_access_group LSM_DLL_LOCAL * value_to_access_group (Value &group)
Value LSM_DLL_LOCAL access_group_to_value (lsm_access_group *group)
int LSM_DLL_LOCAL value_array_to_access_groups (Value &group, lsm_access_group **ag_list[], uint32_t *count)
Value LSM_DLL_LOCAL access_group_list_to_value (lsm_access_group **group, uint32_t count)
lsm_block_range LSM_DLL_LOCAL * value_to_block_range (Value &br)
Value LSM_DLL_LOCAL block_range_to_value (lsm_block_range *br)
lsm_block_range LSM_DLL_LOCAL ** value_to_block_range_list (Value &brl, uint32_t *count)
Value LSM_DLL_LOCAL block_range_list_to_value (lsm_block_range **brl, uint32_t count)
lsm_fs LSM_DLL_LOCAL * value_to_fs (Value &fs)
Value LSM_DLL_LOCAL fs_to_value (lsm_fs *fs)
lsm_fs_ss LSM_DLL_LOCAL * value_to_ss (Value &ss)
Value LSM_DLL_LOCAL ss_to_value (lsm_fs_ss *ss)
lsm_nfs_export LSM_DLL_LOCAL * value_to_nfs_export (Value &exp)
Value LSM_DLL_LOCAL nfs_export_to_value (lsm_nfs_export *exp)
lsm_storage_capabilities
LSM_DLL_LOCAL * 
value_to_capabilities (Value &exp)
Value LSM_DLL_LOCAL capabilities_to_value (lsm_storage_capabilities *cap)
lsm_target_port LSM_DLL_LOCAL * value_to_target_port (Value &tp)
Value LSM_DLL_LOCAL target_port_to_value (lsm_target_port *tp)
int LSM_DLL_LOCAL values_to_uint32_array (Value &value, uint32_t **uint32_array, uint32_t *count)
Value LSM_DLL_LOCAL uint32_array_to_value (uint32_t *uint32_array, uint32_t count)

Variables

const char CLASS_NAME_SYSTEM [] = "System"
const char CLASS_NAME_POOL [] = "Pool"
const char CLASS_NAME_VOLUME [] = "Volume"
const char CLASS_NAME_BLOCK_RANGE [] = "BlockRange"
const char CLASS_NAME_ACCESS_GROUP [] = "AccessGroup"
const char CLASS_NAME_FILE_SYSTEM [] = "FileSystem"
const char CLASS_NAME_DISK [] = "Disk"
const char CLASS_NAME_FS_SNAPSHOT [] = "FsSnapshot"
const char CLASS_NAME_FS_EXPORT [] = "NfsExport"
const char CLASS_NAME_CAPABILITIES [] = "Capabilities"
const char CLASS_NAME_TARGET_PORT [] = "TargetPort"

Define Documentation

#define IS_CLASS ( x,
name   )     is_expected_object(x, name)

Definition at line 41 of file lsm_convert.hpp.

#define IS_CLASS_ACCESS_GROUP (  )     IS_CLASS(x, CLASS_NAME_ACCESS_GROUP)

Definition at line 47 of file lsm_convert.hpp.

#define IS_CLASS_BLOCK_RANGE (  )     IS_CLASS(x, CLASS_NAME_BLOCK_RANGE)

Definition at line 46 of file lsm_convert.hpp.

#define IS_CLASS_FILE_SYSTEM (  )     IS_CLASS(x, CLASS_NAME_FILE_SYSTEM)

Definition at line 48 of file lsm_convert.hpp.

#define IS_CLASS_FS_EXPORT (  )     IS_CLASS(x, CLASS_NAME_FS_EXPORT)

Definition at line 50 of file lsm_convert.hpp.

#define IS_CLASS_FS_SNAPSHOT (  )     IS_CLASS(x, CLASS_NAME_FS_SNAPSHOT)

Definition at line 49 of file lsm_convert.hpp.

#define IS_CLASS_POOL (  )     IS_CLASS(x, CLASS_NAME_POOL)

Definition at line 44 of file lsm_convert.hpp.

#define IS_CLASS_SYSTEM (  )     IS_CLASS(x, CLASS_NAME_SYSTEM)

Definition at line 43 of file lsm_convert.hpp.

#define IS_CLASS_VOLUME (  )     IS_CLASS(x, CLASS_NAME_VOLUME)

Definition at line 45 of file lsm_convert.hpp.


Function Documentation

Value LSM_DLL_LOCAL access_group_list_to_value ( lsm_access_group **  group,
uint32_t  count 
)

Converts an array of lsm_access_group to Value(s)

Parameters:
group Pointer to an array of lsm_access_group
count Number of items in array.
Returns:
std::vector of Values representing access groups

Definition at line 408 of file lsm_convert.cpp.

Here is the call graph for this function:

Value LSM_DLL_LOCAL access_group_to_value ( lsm_access_group group  ) 

Converts a lsm_access_group to a Value

Parameters:
group Group to convert
Returns:
Value, null value type on error.

Definition at line 349 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Value LSM_DLL_LOCAL block_range_list_to_value ( lsm_block_range **  brl,
uint32_t  count 
)

Converts an array of lsm_block_range to Value

Parameters:
brl An array of lsm_block_range
count Number of items in input
Returns:
Value

Definition at line 471 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Value LSM_DLL_LOCAL block_range_to_value ( lsm_block_range br  ) 

Converts a lsm_block_range to a Value

Parameters:
br lsm_block_range to convert
Returns:
Value, null value type on error

Definition at line 437 of file lsm_convert.cpp.

Here is the caller graph for this function:

Value LSM_DLL_LOCAL capabilities_to_value ( lsm_storage_capabilities cap  ) 

Converts a lsm_storage_capabilities to a value

Parameters:
cap lsm_storage_capabilities to convert to value
Returns:
Value

Definition at line 639 of file lsm_convert.cpp.

Here is the call graph for this function:

Value LSM_DLL_LOCAL disk_to_value ( lsm_disk disk  ) 

Converts a lsm_disk to a value

Parameters:
disk lsm_disk to convert to value
Returns:
Value

Definition at line 145 of file lsm_convert.cpp.

Here is the caller graph for this function:

Value LSM_DLL_LOCAL fs_to_value ( lsm_fs fs  ) 

Converts a lsm_fs pointer to a Value

Parameters:
fs File system pointer to convert
Returns:
Value

Definition at line 503 of file lsm_convert.cpp.

Here is the caller graph for this function:

bool LSM_DLL_LOCAL is_expected_object ( Value obj,
std::string  class_name 
)

Checks to see if a value is an expected object instance

Parameters:
obj Value to check
class_name Class name to check
Returns:
boolean, true if matches

Definition at line 24 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Value LSM_DLL_LOCAL nfs_export_to_value ( lsm_nfs_export exp  ) 

Converts a lsm_nfs_export pointer to a Value

Parameters:
exp NFS export pointer to convert
Returns:
Value

Definition at line 605 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Value LSM_DLL_LOCAL pool_to_value ( lsm_pool pool  ) 

Converts a lsm_pool * to Value

Parameters:
pool Pool pointer to convert
Returns:
Value

Definition at line 232 of file lsm_convert.cpp.

Here is the caller graph for this function:

Value LSM_DLL_LOCAL ss_to_value ( lsm_fs_ss ss  ) 

Converts a lsm_ss pointer to a Value

Parameters:
ss Snapshot pointer to convert
Returns:
Value

Definition at line 537 of file lsm_convert.cpp.

Here is the caller graph for this function:

Value LSM_DLL_LOCAL string_list_to_value ( lsm_string_list sl  ) 

Converts a lsm_string_list to a Value

Parameters:
sl String list to convert
Returns:
Value

Definition at line 309 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Value LSM_DLL_LOCAL system_to_value ( lsm_system system  ) 

Converts a lsm_system * to a Value

Parameters:
system pointer to convert to Value
Returns:
Value

Definition at line 269 of file lsm_convert.cpp.

Here is the caller graph for this function:

Value LSM_DLL_LOCAL target_port_to_value ( lsm_target_port *  tp  ) 

Converts a lsm_target_port to a value

Parameters:
tp lsm_target_port to convert to value
Returns:
Value

Definition at line 672 of file lsm_convert.cpp.

Value LSM_DLL_LOCAL uint32_array_to_value ( uint32_t *  uint32_array,
uint32_t  count 
)

Converts an array of uint32 to a value.

Definition at line 721 of file lsm_convert.cpp.

int LSM_DLL_LOCAL value_array_to_access_groups ( Value group,
lsm_access_group **  ag_list[],
uint32_t *  count 
)

Converts an access group list to an array of access group pointers

Parameters:
[in] group Value representing a std::vector of access groups
[out] ag_list Access group array
[out] count Number of items in the returned array.
Returns:
LSM_ERR_OK on success, else error reason

Definition at line 365 of file lsm_convert.cpp.

Here is the call graph for this function:

int LSM_DLL_LOCAL value_array_to_disks ( Value disk_values,
lsm_disk **  disks[],
uint32_t *  count 
)

Converts a vector of disk values to an array.

Parameters:
[in] disk_values Vector of values that represents disks
[out] disks An array of disk pointers
[out] count Number of disks
Returns:
LSM_ERR_OK on success, else error reason.

Definition at line 163 of file lsm_convert.cpp.

Here is the call graph for this function:

int LSM_DLL_LOCAL value_array_to_volumes ( Value volume_values,
lsm_volume **  volumes[],
uint32_t *  count 
)

Converts a vector of volume values to an array

Parameters:
volume_values Vector of values that represents volumes
volumes An array of volume pointers
count Number of volumes
Returns:
LSM_ERR_OK on success, else error reason

Definition at line 78 of file lsm_convert.cpp.

Here is the call graph for this function:

lsm_access_group LSM_DLL_LOCAL* value_to_access_group ( Value group  ) 

Converts a Value to a lsm_access_group

Parameters:
group to convert to lsm_access_group*
Returns:
lsm_access_group *, NULL on error

Definition at line 323 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_block_range LSM_DLL_LOCAL* value_to_block_range ( Value br  ) 

Converts a Value to a lsm_block_range

Parameters:
br Value representing a block range
Returns:
lsm_block_range *

Definition at line 422 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_block_range LSM_DLL_LOCAL** value_to_block_range_list ( Value brl,
uint32_t *  count 
)

Converts a Value to an array of lsm_block_range

Parameters:
[in] brl Value representing block range(s)
[out] count Number of items in the resulting array
Returns:
NULL on memory allocation failure, else array of lsm_block_range

Definition at line 450 of file lsm_convert.cpp.

Here is the call graph for this function:

lsm_storage_capabilities LSM_DLL_LOCAL* value_to_capabilities ( Value exp  ) 

Converts a Value to a lsm_storage_capabilities

Parameters:
exp Value representing a storage capabilities
Returns:
lsm_storage_capabilities pointer or NULL on error

Definition at line 627 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_disk LSM_DLL_LOCAL* value_to_disk ( Value disk  ) 

Converts a Value to a lsm_disk

Parameters:
disk Value representing a disk
Returns:
lsm_disk pointer, else NULL on error

Definition at line 124 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_fs LSM_DLL_LOCAL* value_to_fs ( Value fs  ) 

Converts a value to a lsm_fs *

Parameters:
fs Value representing a FS to be converted
Returns:
lsm_fs pointer or NULL on error.

Definition at line 484 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_nfs_export LSM_DLL_LOCAL* value_to_nfs_export ( Value exp  ) 

Converts a value to a lsm_nfs_export *

Parameters:
exp Value representing a nfs export to be converted
Returns:
lsm_nfs_export pointer or NULL on error.

Definition at line 551 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_pool LSM_DLL_LOCAL* value_to_pool ( Value pool  ) 

Converts a value to a pool

Parameters:
pool To convert to lsm_pool *
Returns:
lsm_pool *, else NULL on error.

Definition at line 209 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_fs_ss LSM_DLL_LOCAL* value_to_ss ( Value ss  ) 

Converts a value to a lsm_ss *

Parameters:
ss Value representing a snapshot to be converted
Returns:
lsm_ss pointer or NULL on error.

Definition at line 521 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_string_list LSM_DLL_LOCAL* value_to_string_list ( Value list  ) 

Converts an array of Values to a lsm_string_list

Parameters:
list List represented as an vector of strings.
Returns:
lsm_string_list pointer, NULL on error.

Definition at line 284 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_system LSM_DLL_LOCAL* value_to_system ( Value system  ) 

Converts a value to a system

Parameters:
system to convert to lsm_system *
Returns:
lsm_system pointer, else NULL on error

Definition at line 252 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_target_port LSM_DLL_LOCAL* value_to_target_port ( Value tp  ) 

Convert a Value representation to lsm_target_port

Parameters:
tp Value to convert to lsm_target_port
Returns:
lsm_target_port pointer or NULL on errors

Definition at line 653 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

lsm_volume LSM_DLL_LOCAL* value_to_volume ( Value vol  ) 

Converts a volume to a volume.

Parameters:
vol Value to convert.
Returns:
lsm_volume *, else NULL on error

Definition at line 36 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int LSM_DLL_LOCAL values_to_uint32_array ( Value value,
uint32_t **  uint32_array,
uint32_t *  count 
)

Converts a value to array of uint32.

Definition at line 690 of file lsm_convert.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Value LSM_DLL_LOCAL volume_to_value ( lsm_volume vol  ) 

Converts a lsm_volume *to a Value

Parameters:
vol lsm_volume to convert
Returns:
Value

Definition at line 59 of file lsm_convert.cpp.

Here is the caller graph for this function:


Variable Documentation

const char CLASS_NAME_ACCESS_GROUP[] = "AccessGroup"

Definition at line 32 of file lsm_convert.hpp.

const char CLASS_NAME_BLOCK_RANGE[] = "BlockRange"

Definition at line 31 of file lsm_convert.hpp.

const char CLASS_NAME_CAPABILITIES[] = "Capabilities"

Definition at line 37 of file lsm_convert.hpp.

const char CLASS_NAME_DISK[] = "Disk"

Definition at line 34 of file lsm_convert.hpp.

const char CLASS_NAME_FILE_SYSTEM[] = "FileSystem"

Definition at line 33 of file lsm_convert.hpp.

const char CLASS_NAME_FS_EXPORT[] = "NfsExport"

Definition at line 36 of file lsm_convert.hpp.

const char CLASS_NAME_FS_SNAPSHOT[] = "FsSnapshot"

Definition at line 35 of file lsm_convert.hpp.

const char CLASS_NAME_POOL[] = "Pool"

Definition at line 29 of file lsm_convert.hpp.

const char CLASS_NAME_SYSTEM[] = "System"

Class names for serialized json

Definition at line 28 of file lsm_convert.hpp.

const char CLASS_NAME_TARGET_PORT[] = "TargetPort"

Definition at line 38 of file lsm_convert.hpp.

const char CLASS_NAME_VOLUME[] = "Volume"

Definition at line 30 of file lsm_convert.hpp.


Generated on 9 Jul 2015 for libStorageMgmt by  doxygen 1.6.1