Detailed Description
This set of functions enables you to create and manipulate volumes for Teamcenter.
Because Teamcenter Volumes are POM Application Objects, AOM functions work with them.
Include tcvolume.h to use these functions.
This set of functions enables you to set the Teamcenter volumes in different backup modes for administering hot Backup & Recovery. Include backup_modes.h to use these functions.
Defines
Functions
- SA_API int VM_extent (int *n_instances, tag_t **instances)
- SA_API int VM_find (const char volume_name[VM_name_size_c+1], tag_t *volume)
- SA_API int VM_find2 (const char *volume_name, tag_t *volume)
- SA_API int VM_find_by_path (const char path[VM_path_size_c+1], int machine_type, tag_t *volume)
- SA_API int VM_find_by_path2 (const char *path, int machine_type, tag_t *volume)
- SA_API int VM_ask_name (tag_t volume, char volume_name[VM_name_size_c+1])
- SA_API int VM_ask_name2 (tag_t volume, char **volume_name)
- SA_API int VM_ask_node_name (tag_t volume, char node_name[VM_node_size_c+1])
- SA_API int VM_ask_node_name2 (tag_t volume, char **node_name)
- SA_API int VM_ask_path (tag_t volume, int machine_type, char path[VM_path_size_c+1])
- SA_API int VM_ask_path2 (tag_t volume, int machine_type, char **path)
- SA_API int VM_ask_machine_type (tag_t volume, int *machine_type)
- SA_API int VM_ask_access_mode (tag_t volume, int *access_mode)
- SA_API int VM_grant_access (tag_t volume, tag_t target)
- SA_API int VM_revoke_access (tag_t volume, tag_t target)
- SA_API int VM_check_access (tag_t volume, tag_t user, int *access_flag)
- SA_API int VM_ask_access_list (tag_t volume, int *count, tag_t **tag_list)
- SA_API int VM_ask_current_volume (tag_t *volume_tag)
- SA_API int VM_ask_current_local_volume (tag_t *volume_tag)
- SA_API int VM_ask_current_local_volume_for_user (tag_t user_tag, tag_t *volume_tag)
- SA_API int VM_ask_store_and_forward_enabled (logical *enabled)
- SA_API int VM_set_current_volume (tag_t volumeTag, char *volumeName)
- SA_API int VM_set_current_local_volume (tag_t volumeTag, char *volumeName)
- SA_API int VM_expand_path (char *oldpath, char *newpath)
- SA_API int VM_createEx (const char volume_name[VM_name_size_c+1], const char node_name[VM_node_size_c+1], const char *pathnames[SS_NUM_MTYPES], int machine_type, tag_t *volume)
- SA_API int VM_createEx2 (const char *volume_name, const char *node_name, const char **pathnames, int machine_type, tag_t *volume)
- SA_API int VM_createExFMS (const char volume_name[VM_name_size_c+1], const char node_name[VM_node_size_c+1], const char *pathnames[SS_NUM_MTYPES], int machine_type, const char *fsc_path, const char *fsc_name, const char *filestore_group, const char *load_balancer, tag_t *volume)
- SA_API int VM_createExFMS2 (const char *volume_name, const char *node_name, const char **pathnames, int machine_type, const char *fsc_path, const char *fsc_name, const char *filestore_group, const char *load_balancer, tag_t *volume)
- SA_API int VM_initializeEx (tag_t volume, const char volume_name[VM_name_size_c+1], const char node_name[VM_node_size_c+1], const char *pathnames[SS_NUM_MTYPES], int machine_type)
- SA_API int VM_initializeEx2 (tag_t volume, const char *volume_name, const char *node_name, const char **pathnames, int machine_type)
- SA_API int VM_modifyEx (tag_t volume, const char volume_name[VM_name_size_c+1], const char node_name[VM_node_size_c+1], const char *pathnames[SS_NUM_MTYPES], int machine_type)
- SA_API int VM_modifyEx2 (tag_t volume, const char *volume_name, const char *node_name, const char **pathnames, int machine_type)
- SA_API int VM_moveEx (tag_t volume, const char node_name[VM_node_size_c+1], const char *pathnames[SS_NUM_MTYPES], int machine_type)
- SA_API int VM_moveEx2 (tag_t volume, const char *node_name, const char **pathnames, int machine_type)
- SA_API int VM_list_accessible_volumes (int *n_instances, tag_t **instances)
- TC_API int TC_initialize_backup_mode (int mode)
- TC_API int TC_set_backup_mode (int mode)
- TC_API int TC_get_osfile_open_count (int *count)
- TC_API int TC_get_current_backup_mode (int *mode)
Define Documentation
#define FS_BLOBBY_VOL_MODE 31 |
#define FS_NORMAL_MODE 28 |
#define FS_RDONLY_MODE 29 |
#define VM_name_size_c 32 |
#define VM_node_size_c 32 |
#define VM_path_size_c SS_MAXPATHLEN |
Function Documentation
TC_API int TC_get_current_backup_mode |
( |
int * |
mode |
) |
|
Gets the current backup mode. Valid values for the mode are NORMAL_MODE, RDONLY_MODE and BLOBBY_MODE.
- Parameters:
-
TC_API int TC_get_osfile_open_count |
( |
int * |
count |
) |
|
Provides the count of the currently opened OS files for write/append operations.
- Parameters:
-
count |
(O) count of open files |
TC_API int TC_initialize_backup_mode |
( |
int |
mode |
) |
|
Initializes the backup mode. Valid values for the mode are NORMAL_MODE, RDONLY_MODE and BLOBBY_MODE.
- Parameters:
-
TC_API int TC_set_backup_mode |
( |
int |
mode |
) |
|
Sets the backup mode. Call the ITK method TC_initialize_backup_mode before setting backup modes. Valid values for the mode are NORMAL_MODE, RDONLY_MODE and BLOBBY_MODE.
- Parameters:
-
SA_API int VM_ask_access_list |
( |
tag_t |
volume, |
|
|
int * |
count, |
|
|
tag_t ** |
tag_list | |
|
) |
| | |
Returns an array of tags for all of the groups and users that have access to this volume. The space allocated to tag_list should be freed with a call to MEM_free.
- Parameters:
-
volume |
(I) |
count |
(O) |
tag_list |
(OF) count |
SA_API int VM_ask_access_mode |
( |
tag_t |
volume, |
|
|
int * |
access_mode | |
|
) |
| | |
Returns the current access mode for the volume. This can be either VM_FMS_ACCESS or VM_NO_SECURITY.
- Parameters:
-
volume |
(I) |
access_mode |
(O) |
SA_API int VM_ask_current_local_volume |
( |
tag_t * |
volume_tag |
) |
|
Returns the local volume currently assigned to the current user.
- Parameters:
-
SA_API int VM_ask_current_local_volume_for_user |
( |
tag_t |
user_tag, |
|
|
tag_t * |
volume_tag | |
|
) |
| | |
Returns the local volume currently assigned to the specified user.
- Parameters:
-
user_tag |
(I) |
volume_tag |
(O) |
SA_API int VM_ask_current_volume |
( |
tag_t * |
volume_tag |
) |
|
Returns the volume currently assigned to the user.
- Parameters:
-
SA_API int VM_ask_machine_type |
( |
tag_t |
volume, |
|
|
int * |
machine_type | |
|
) |
| | |
Returns the current value for the specified attribute on the specified volume.
- Parameters:
-
volume |
(I) |
machine_type |
(O) |
SA_API int VM_ask_name |
( |
tag_t |
volume, |
|
|
char |
volume_name[VM_name_size_c+1] | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_ask_name2
Returns the current value for the specified attribute on the specified volume.
- Parameters:
-
volume |
(I) |
volume_name |
(O) |
SA_API int VM_ask_name2 |
( |
tag_t |
volume, |
|
|
char ** |
volume_name | |
|
) |
| | |
Returns the current value for the specified attribute on the specified volume.
- Parameters:
-
volume |
(I) |
volume_name |
(OF) |
SA_API int VM_ask_node_name |
( |
tag_t |
volume, |
|
|
char |
node_name[VM_node_size_c+1] | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_ask_node_name2
Returns the current value for the specified attribute on the specified volume.
- Parameters:
-
SA_API int VM_ask_node_name2 |
( |
tag_t |
volume, |
|
|
char ** |
node_name | |
|
) |
| | |
Returns the current value for the specified attribute on the specified volume.
- Parameters:
-
volume |
(I) |
node_name |
(OF) |
SA_API int VM_ask_path |
( |
tag_t |
volume, |
|
|
int |
machine_type, |
|
|
char |
path[VM_path_size_c+1] | |
|
) |
| | |
Returns the current value for the specified attribute on the specified volume.
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use the corresponding ITK version2
- Parameters:
-
volume |
(I) |
machine_type |
(I) |
path |
(O) |
SA_API int VM_ask_path2 |
( |
tag_t |
volume, |
|
|
int |
machine_type, |
|
|
char ** |
path | |
|
) |
| | |
- Parameters:
-
volume |
(I) |
machine_type |
(I) |
path |
(OF) |
SA_API int VM_ask_store_and_forward_enabled |
( |
logical * |
enabled |
) |
|
Routine to see if Store and Forward is enabled for this user.
- Parameters:
-
SA_API int VM_check_access |
( |
tag_t |
volume, |
|
|
tag_t |
user, |
|
|
int * |
access_flag | |
|
) |
| | |
Checks if a specific user has access to specific volume. The access flag is TRUE if the currently logged in user has access to the input volume. The access flag is FALSE if the user does not have access. The volume and user arguments specify the volume and user for which access is to be checked.
- Parameters:
-
volume |
(I) |
user |
(I) |
access_flag |
(O) |
SA_API int VM_createEx |
( |
const char |
volume_name[VM_name_size_c+1], |
|
|
const char |
node_name[VM_node_size_c+1], |
|
|
const char * |
pathnames[SS_NUM_MTYPES], |
|
|
int |
machine_type, |
|
|
tag_t * |
volume | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_createEx2
Creates a new volume and automatically saves it if there are no errors.
- Parameters:
-
volume_name |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of the volume to be created. The array index should correspond to the machine type on which the volume will reside. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) Must be SS_WNT_MACHINE, SS_UNIX_MACHINE or SS_MACHINE_TYPE (i.e., the type of machine you are running on) |
volume |
(O) |
SA_API int VM_createEx2 |
( |
const char * |
volume_name, |
|
|
const char * |
node_name, |
|
|
const char ** |
pathnames, |
|
|
int |
machine_type, |
|
|
tag_t * |
volume | |
|
) |
| | |
Creates a new volume and automatically saves it if there are no errors.
- Parameters:
-
volume_name |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of the volume to be created. The array index should correspond to the machine type on which the volume will reside. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) Must be SS_WNT_MACHINE, SS_UNIX_MACHINE or SS_MACHINE_TYPE (i.e., the type of machine you are running on) |
volume |
(O) |
SA_API int VM_createExFMS |
( |
const char |
volume_name[VM_name_size_c+1], |
|
|
const char |
node_name[VM_node_size_c+1], |
|
|
const char * |
pathnames[SS_NUM_MTYPES], |
|
|
int |
machine_type, |
|
|
const char * |
fsc_path, |
|
|
const char * |
fsc_name, |
|
|
const char * |
filestore_group, |
|
|
const char * |
load_balancer, |
|
|
tag_t * |
volume | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_createExFMS2
Creates a new volume and automatically saves it if there are no errors. The FMS configuration will be automatically updated. Only one of fsc_name, filestore_group, and load_balancer may be specified. The other two arguments must be NULL. The fsc_path argument is obsolete. Any value may be specified, but a value of NULL is recommended.
- Parameters:
-
volume_name |
(I) The name of the volume to be created. |
node_name |
(I) The name of node on which the volume will reside. |
pathnames |
(I) Pathname of the volume to be created. The array index should correspond to the machine type on which the volume will reside. (e.g., pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) Must be SS_WNT_MACHINE, SS_UNIX_MACHINE or SS_MACHINE_TYPE (i.e., the type of machine you are running on) |
volume |
(O) The tag of the volume that was created. |
SA_API int VM_createExFMS2 |
( |
const char * |
volume_name, |
|
|
const char * |
node_name, |
|
|
const char ** |
pathnames, |
|
|
int |
machine_type, |
|
|
const char * |
fsc_path, |
|
|
const char * |
fsc_name, |
|
|
const char * |
filestore_group, |
|
|
const char * |
load_balancer, |
|
|
tag_t * |
volume | |
|
) |
| | |
Creates a new volume and automatically saves it if there are no errors. The FMS configuration will be automatically updated. Only one of fsc_name, filestore_group, and load_balancer may be specified. The other two arguments must be NULL. The fsc_path argument is obsolete. Any value may be specified, but a value of NULL is recommended.
An error VM_INV_PATH (14004) will be returned if the pathname for the volume is does not exist or is syntactically incorrect. An error VM_NO_CREATE (14009) will be returned if the volume cannot be created. This could occur for any number of reasons including, but not limited to, an inactive FSC. An error VM_NO_FSC_NAME_GRP_AND_LB (14051) will be returned if the arguments fsc_name, filestore_group, and load_balancer are all null. An error VM_BAD_COMB_FSC_NAME_GRP_LB (14052) will be returned if a load_balancer argument is supplied and either the fsc_name or the filestore_group are non-null.
- Parameters:
-
volume_name |
(I) The name of the volume to be created. |
node_name |
(I) The name of node on which the volume will reside. |
pathnames |
(I) Pathname of the volume to be created. The array index should correspond to the machine type on which the volume will reside. (e.g., pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) Must be SS_WNT_MACHINE, SS_UNIX_MACHINE or SS_MACHINE_TYPE (i.e., the type of machine you are running on) |
volume |
(O) The tag of the volume that was created. |
SA_API int VM_expand_path |
( |
char * |
oldpath, |
|
|
char * |
newpath | |
|
) |
| | |
Converts a pathname contain an environment variable to a complete operating system pathname.
- Parameters:
-
oldpath |
(I) Pathname returned from VM_ask_path. The pathname can contain a logical or an environment variable. |
newpath |
(O) Full operating system pathname |
SA_API int VM_extent |
( |
int * |
n_instances, |
|
|
tag_t ** |
instances | |
|
) |
| | |
Lists all instances of Teamcenter Volumes.
- Parameters:
-
n_instances |
(O) |
instances |
(OF) n_instances |
SA_API int VM_find |
( |
const char |
volume_name[VM_name_size_c+1], |
|
|
tag_t * |
volume | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_find2
Finds a volume with the given name. A return of
NULLTAG indicates that no volumes exist with the given name. An error is not returned if no volumes exist with the given name.
- Parameters:
-
volume_name |
(I) |
volume |
(O) |
SA_API int VM_find2 |
( |
const char * |
volume_name, |
|
|
tag_t * |
volume | |
|
) |
| | |
Finds a volume with the given name. A return of NULLTAG indicates that no volumes exist with the given name. An error is not returned if no volumes exist with the given name.
- Parameters:
-
volume_name |
(I) |
volume |
(O) |
SA_API int VM_find_by_path |
( |
const char |
path[VM_path_size_c+1], |
|
|
int |
machine_type, |
|
|
tag_t * |
volume | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_find_by_path2
Returns the tag of the volume with the given path name. The machine type (
SS_WNT_MACHINE or
SS_UNIX_MACHINE), must be specified to indicate whether you want to match on the UNIX or NT pathname.
- Parameters:
-
path |
(I) |
machine_type |
(I) |
volume |
(O) |
SA_API int VM_find_by_path2 |
( |
const char * |
path, |
|
|
int |
machine_type, |
|
|
tag_t * |
volume | |
|
) |
| | |
Returns the tag of the volume with the given path name. The machine type (SS_WNT_MACHINE or SS_UNIX_MACHINE), must be specified to indicate whether you want to match on the UNIX or NT pathname.
- Parameters:
-
path |
(I) |
machine_type |
(I) |
volume |
(O) |
SA_API int VM_grant_access |
( |
tag_t |
volume, |
|
|
tag_t |
target | |
|
) |
| | |
Grants or revokes access to the given volume for a user or group.
- Parameters:
-
SA_API int VM_initializeEx |
( |
tag_t |
volume, |
|
|
const char |
volume_name[VM_name_size_c+1], |
|
|
const char |
node_name[VM_node_size_c+1], |
|
|
const char * |
pathnames[SS_NUM_MTYPES], |
|
|
int |
machine_type | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_initializeEx2
Initializes standard volume attributes for a newly created instance of a subclass of TcVolume. It is not necessary to call it for any TcVolumes.
- Parameters:
-
volume |
(I) |
volume_name |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of volume whose attributes will be initialized. The array index should correspond to the machine type on which the volume resides. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) |
SA_API int VM_initializeEx2 |
( |
tag_t |
volume, |
|
|
const char * |
volume_name, |
|
|
const char * |
node_name, |
|
|
const char ** |
pathnames, |
|
|
int |
machine_type | |
|
) |
| | |
Initializes standard volume attributes for a newly created instance of a subclass of TcVolume. It is not necessary to call it for any TcVolumes.
- Parameters:
-
volume |
(I) |
volume_name |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of volume whose attributes will be initialized. The array index should correspond to the machine type on which the volume resides. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) |
SA_API int VM_list_accessible_volumes |
( |
int * |
n_instances, |
|
|
tag_t ** |
instances | |
|
) |
| | |
Lists all Teamcenter Volumes to which user has access.
- Parameters:
-
n_instances |
(O) Count of volume instances. |
instances |
(OF) n_instances |
SA_API int VM_modifyEx |
( |
tag_t |
volume, |
|
|
const char |
volume_name[VM_name_size_c+1], |
|
|
const char |
node_name[VM_node_size_c+1], |
|
|
const char * |
pathnames[SS_NUM_MTYPES], |
|
|
int |
machine_type | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_modifyEx2
Sets new values for all of the input attributes for a volume. All of the input values to this function must have valid values. Even if you only want to change the volume name you must first read the current values of node_name, vms_path, unix_path, and machine_type, then pass the current values along with the new value for volume_name into this function.
If you provide new values for the paths, only the TcVolume attributes will be modified. The files will not be moved and a new directory will not be created. Also ensure that the OS directories can be created under the modified paths. In addition you may have to manually configure the fmsmaster.xml with the modified path to make the volume available.
- Parameters:
-
volume |
(I) |
volume_name |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of volume whose attributes will be modified. The array index should correspond to the machine type on which the volume resides. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) |
SA_API int VM_modifyEx2 |
( |
tag_t |
volume, |
|
|
const char * |
volume_name, |
|
|
const char * |
node_name, |
|
|
const char ** |
pathnames, |
|
|
int |
machine_type | |
|
) |
| | |
Sets new values for all of the input attributes for a volume. All of the input values to this function must have valid values. Even if you only want to change the volume name you must first read the current values of node_name, vms_path, unix_path, and machine_type, then pass the current values along with the new value for volume_name into this function.
If you provide new values for the paths, only the TcVolume attributes will be modified. The files will not be moved and a new directory will not be created. Also ensure that the OS directories can be created under the modified paths. In addition you may have to manually configure the fmsmaster.xml with the modified path to make the volume available.
- Parameters:
-
volume |
(I) |
volume_name |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of volume whose attributes will be modified. The array index should correspond to the machine type on which the volume resides. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) |
SA_API int VM_moveEx |
( |
tag_t |
volume, |
|
|
const char |
node_name[VM_node_size_c+1], |
|
|
const char * |
pathnames[SS_NUM_MTYPES], |
|
|
int |
machine_type | |
|
) |
| | |
- Deprecated:
- This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use VM_moveEx2
Moves a volume and all of its contents to another location. The TcVolume object is saved automatically on success.
- Parameters:
-
volume |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of the destination volume. The array index should correspond to the machine type on which the newly located volume will reside. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) |
SA_API int VM_moveEx2 |
( |
tag_t |
volume, |
|
|
const char * |
node_name, |
|
|
const char ** |
pathnames, |
|
|
int |
machine_type | |
|
) |
| | |
Moves a volume and all of its contents to another location. The TcVolume object is saved automatically on success.
- Parameters:
-
volume |
(I) |
node_name |
(I) |
pathnames |
(I) Pathname of the destination volume. The array index should correspond to the machine type on which the newly located volume will reside. (e.g. pathnames[SS_WNT_MACHINE] = myNTVolumePath; |
machine_type |
(I) |
SA_API int VM_revoke_access |
( |
tag_t |
volume, |
|
|
tag_t |
target | |
|
) |
| | |
Grants or revokes access to the given volume for a user or group.
- Parameters:
-
SA_API int VM_set_current_local_volume |
( |
tag_t |
volumeTag, |
|
|
char * |
volumeName | |
|
) |
| | |
Sets the current local volume to that specified by volumeTag or volumeName. The volumeName is used if the volumeTag is set to NULLTAG. volumeTag takes precedence over volumeName in case both parameters are present.
- Parameters:
-
volumeTag |
(I) current local volume tag |
volumeName |
(I) current local volume name |
SA_API int VM_set_current_volume |
( |
tag_t |
volumeTag, |
|
|
char * |
volumeName | |
|
) |
| | |
Sets the current volume to that specified by volumeTag or volumeName. The volumeName is used if the volumeTag is set to NULLTAG.
- Parameters:
-
volumeTag |
(I) |
volumeName |
(I) |