irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

reSysDataObjOpr.hpp File Reference
#include "rods.h"
#include "objMetaOpr.hpp"
#include "dataObjRepl.h"
#include "modDataObjMeta.h"
Include dependency graph for reSysDataObjOpr.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int msiSetRescSortScheme (msParam_t *sortScheme, ruleExecInfo_t *rei)
 
int msiSysReplDataObj (msParam_t *xcacheResc, msParam_t *xallFlag, ruleExecInfo_t *rei)
 
int msiStageDataObj (msParam_t *cacheResc, ruleExecInfo_t *rei)
 
int msiSetDataObjPreferredResc (msParam_t *preferredResc, ruleExecInfo_t *rei)
 
int msiSetDataObjAvoidResc (msParam_t *preferredResc, ruleExecInfo_t *rei)
 
int msiSortDataObj (msParam_t *sortScheme, ruleExecInfo_t *rei)
 
int msiSysChksumDataObj (ruleExecInfo_t *rei)
 
int msiSetDataTypeFromExt (ruleExecInfo_t *rei)
 
int msiSetNoDirectRescInp (msParam_t *rescList, ruleExecInfo_t *rei)
 
int msiSetDefaultResc (msParam_t *defaultResc, msParam_t *forceStr, ruleExecInfo_t *rei)
 
int msiSetNumThreads (msParam_t *sizePerThrInMbStr, msParam_t *maxNumThrStr, msParam_t *windowSizeStr, ruleExecInfo_t *rei)
 
int msiDeleteDisallowed (ruleExecInfo_t *rei)
 
int msiOprDisallowed (ruleExecInfo_t *rei)
 
int msiSetMultiReplPerResc (ruleExecInfo_t *rei)
 
int msiNoChkFilePathPerm (ruleExecInfo_t *rei)
 
int msiSetChkFilePathPerm (msParam_t *xchkType, ruleExecInfo_t *rei)
 
int msiNoTrashCan (ruleExecInfo_t *rei)
 
int msiSetPublicUserOpr (msParam_t *xoprList, ruleExecInfo_t *rei)
 
int setApiPerm (int apiNumber, int proxyPerm, int clientPerm)
 
int msiSetGraftPathScheme (msParam_t *xaddUserName, msParam_t *xtrimDirCnt, ruleExecInfo_t *rei)
 
int msiSetRandomScheme (ruleExecInfo_t *rei)
 
int msiSetReServerNumProc (msParam_t *xnumProc, ruleExecInfo_t *rei)
 
int msiSetRescQuotaPolicy (msParam_t *xflag, ruleExecInfo_t *rei)
 
int msiSysMetaModify (msParam_t *sysMetadata, msParam_t *value, ruleExecInfo_t *rei)
 

Function Documentation

◆ msiDeleteDisallowed()

msiDeleteDisallowed ( ruleExecInfo_t rei)
Description:\n This microservice sets the policy for determining that certain data cannot be deleted.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 876 of file reSysDataObjOpr.cpp.

References RE_TEST_MACRO, RuleExecInfo::status, and SYS_DELETE_DISALLOWED.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

◆ msiNoChkFilePathPerm()

msiNoChkFilePathPerm ( ruleExecInfo_t rei)
Description:\n This microservice does not check file path permissions when registering a file. This microservice is REPLACED by msiSetChkFilePathPerm
Module:\n core
Since
pre-2.1
Author
Mike Wan
Warning
This microservice can create a security problem if used incorrectly.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
NO_CHK_PATH_PERM
Precondition
none
Postcondition
none
See also
none

Definition at line 991 of file reSysDataObjOpr.cpp.

References NO_CHK_PATH_PERM, and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

◆ msiNoTrashCan()

msiNoTrashCan ( ruleExecInfo_t rei)
Description:\n This microservice sets the policy to no trash can.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
NO_TRASH_CAN
Precondition
none
Postcondition
none
See also
none

Definition at line 1084 of file reSysDataObjOpr.cpp.

References NO_TRASH_CAN, and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

◆ msiOprDisallowed()

msiOprDisallowed ( ruleExecInfo_t rei)
Description:\n This generic microservice sets the policy for determining that certain operation is not allowed.
Module:\n core
Since
2.3
Author
Date
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n
Session Variables Modified:\n
iCAT Attributes Used:\n
iCAT Attributes Modified:\n
Side Effect:\n
Returns
integer
Return values
0on success
Precondition
Postcondition
See also

Definition at line 915 of file reSysDataObjOpr.cpp.

References MSI_OPERATION_NOT_ALLOWED, RE_TEST_MACRO, and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

◆ msiSetChkFilePathPerm()

msiSetChkFilePathPerm ( msParam_t xchkType,
ruleExecInfo_t rei 
)
Description:\n This microservice set the check type for file path permission check when registering a file.
Module:\n core
Since
pre-3.1
Author
Mike Wan
Warning
This microservice can create a security problem if set to anything other than DISALLOW_PATH_REG and used incorrectly.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xchkType- Required - a msParam of type STR_MS_T which defines the check type to set. Valid values are DO_CHK_PATH_PERM_STR, NO_CHK_PATH_PERM_STR, CHK_NON_VAULT_PATH_PERM_STR and DISALLOW_PATH_REG_STR.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
DO_CHK_PATH_PERM,NO_CHK_PATH_PERM,CHK_NON_VAULT_PATH_PERMor DISALLOW_PATH_REG.
Precondition
none
Postcondition
none
See also
none

Definition at line 1028 of file reSysDataObjOpr.cpp.

References CHK_NON_VAULT_PATH_PERM, CHK_NON_VAULT_PATH_PERM_STR, DISALLOW_PATH_REG, DISALLOW_PATH_REG_STR, DO_CHK_PATH_PERM, DO_CHK_PATH_PERM_STR, MsParam::inOutStruct, LOG_ERROR, NO_CHK_PATH_PERM, NO_CHK_PATH_PERM_STR, rodsLog(), and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetDataObjAvoidResc()

msiSetDataObjAvoidResc ( msParam_t xavoidResc,
ruleExecInfo_t rei 
)
Description:\n This microservice specifies the copy to avoid.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xavoidResc- a msParam of type STR_MS_T - the name of the resource to avoid
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doinp->openFlags, rei->doi
Session Variables Modified:\n - rei->doi
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 312 of file reSysDataObjOpr.cpp.

References RuleExecInfo::doi, RuleExecInfo::doinp, getWriteFlag(), MsParam::inOutStruct, NULL, DataObjInp::openFlags, RE_TEST_MACRO, requeDataObjInfoByResc(), and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetDataObjPreferredResc()

msiSetDataObjPreferredResc ( msParam_t xpreferredRescList,
ruleExecInfo_t rei 
)
Description:\n If the data has multiple copies, this microservice specifies the preferred copy to use.
It sets the preferred resources of the opened object.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Note
The copy stored in this preferred resource will be picked if it exists. More than one resource can be input using the character "%" as separator. e.g., resc1resc2resc3. The most preferred resource should be at the top of the list.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xpreferredRescList- a msParam of type STR_MS_T, comma-delimited list of resources
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doinp->openFlags, rei->doi
Session Variables Modified:\n - rei->doi
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 239 of file reSysDataObjOpr.cpp.

References RuleExecInfo::doi, RuleExecInfo::doinp, getWriteFlag(), MsParam::inOutStruct, StrArray::len, DataObjInfo::next, NULL, DataObjInp::openFlags, parseMultiStr(), RE_TEST_MACRO, requeDataObjInfoByResc(), StrArray::size, irods.pypyodbc::status, RuleExecInfo::status, StrArray::value, and get_irods_version::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetDataTypeFromExt()

msiSetDataTypeFromExt ( ruleExecInfo_t rei)
Description:\n This microservice checks if the filename has an extension
(string following a period (.)) and if so, checks if the iCAT has a matching entry for it, and if so sets the dataObj data type.
Module:\n core
Since
pre-2.1
Note
Always returns success since it is only doing an attempt; that is, failure is common and not really a failure.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 454 of file reSysDataObjOpr.cpp.

References addInxIval(), addInxVal(), addKeyVal(), clearGenQueryInp(), COL_TOKEN_NAME, COL_TOKEN_NAMESPACE, COL_TOKEN_VALUE2, DATA_TYPE_KW, modDataObjMeta_t::dataObjInfo, RuleExecInfo::doi, freeGenQueryOut(), IN_PDMO_KW, LOG_DEBUG, MAX_NAME_LEN, GenQueryInp::maxRows, NULL, DataObjInfo::objPath, RE_TEST_MACRO, modDataObjMeta_t::regParam, DataObjInfo::rescHier, rodsLog(), GenQueryOut::rowCnt, RuleExecInfo::rsComm, rsGenQuery(), rsModDataObjMeta(), GenQueryInp::selectInp, splitPathByKey(), GenQueryInp::sqlCondInp, GenQueryOut::sqlResult, irods.pypyodbc::status, RuleExecInfo::status, svrCloseQueryOut(), and SqlResult::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetDefaultResc()

msiSetDefaultResc ( msParam_t xdefaultRescList,
msParam_t xoptionStr,
ruleExecInfo_t rei 
)
Description:\n This microservice sets the default resource and query resource metadata for
the subsequent use based on an input array and condition given in the dataObject Input Structure.
Module:\n core
Since
pre-2.1
Note
This function is mandatory even no defaultResc is specified (null) and should be executed right after the screening function msiSetNoDirectRescInp.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xdefaultRescList- Required - a msParam of type STR_MS_T which is a list of %-delimited resourceNames. It is a resource to use if no resource is input. A "null" means there is no defaultResc.
[in]xoptionStr- a msParam of type STR_MS_T which is an option (preferred, forced, random) with random as default. A "forced" input means the defaultResc will be used regardless of the user input. The forced action only apply to to users with normal privilege.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n rei->doinp->condInput,
rei->rsComm->proxyUser.authInfo.authFlag
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 69 of file reSysDataObjOpr.cpp.

References irods::error::code(), DataObjInp::condInput, RuleExecInfo::doinp, MsParam::inOutStruct, irods::log(), NAME_LEN, PASS, RE_TEST_MACRO, RuleExecInfo::rescName, RuleExecInfo::rsComm, irods::set_default_resource(), and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetGraftPathScheme()

msiSetGraftPathScheme ( msParam_t xaddUserName,
msParam_t xtrimDirCnt,
ruleExecInfo_t rei 
)
Description:\n This microservice sets the VaultPath scheme to GRAFT_PATH.
It grafts (adds) the logical path to the vault path of the resource when generating the physical path for a data object.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xaddUserName- This msParam specifies whether the userName should be added to the physical path. e.g. $vaultPath/$userName/$logicalPath. "xaddUserName" can have two values - yes or no.
[in]xtrimDirCnt- This msParam specifies the number of leading directory elements of the logical path to trim. Sometimes it may not be desirable to graft the entire logical path. e.g.,for a logicalPath /myZone/home/me/foo/bar, it may be desirable to graft just the part "foo/bar" to the vaultPath. "xtrimDirCnt" should be set to 3 in this case.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->inOutMsParamArray (label == VAULT_PATH_POLICY)
Session Variables Modified:\n - rei->inOutMsParamArray (label == VAULT_PATH_POLICY)
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 1261 of file reSysDataObjOpr.cpp.

References addMsParam(), vaultPathPolicy_t::addUserName, getMsParamByLabel(), GRAFT_PATH_S, RuleExecInfo::inOutMsParamArray, MsParam::inOutStruct, LOG_ERROR, NULL, RE_TEST_MACRO, rodsLog(), vaultPathPolicy_t::scheme, RuleExecInfo::status, SYS_INPUT_PERM_OUT_OF_RANGE, vaultPathPolicy_t::trimDirCnt, VAULT_PATH_POLICY, and VaultPathPolicy_MS_T.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetMultiReplPerResc()

msiSetMultiReplPerResc ( ruleExecInfo_t rei)
Description:\n By default, the system allows one copy per resource. This microservice sets the number of copies per resource to unlimited.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n - rei->statusStr
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 954 of file reSysDataObjOpr.cpp.

References MAX_NAME_LEN, MULTI_COPIES_PER_RESC, rstrcpy(), and RuleExecInfo::statusStr.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetNoDirectRescInp()

msiSetNoDirectRescInp ( msParam_t xrescList,
ruleExecInfo_t rei 
)
Description:\n This microservice sets a list of resources that cannot be used by a normal
user directly. It checks a given list of taboo-resources against the user provided resource name and disallows if the resource is in the list of taboo-resources.
Module:\n core
Since
pre-2.1
Note
This microservice is optional, but if used, should be the first function to execute because it screens the resource input.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xrescList- InpParam is a xrescList of type STR_MS_T which is a list of %-delimited resourceNames e.g., resc1resc2resc3.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n rei->doinp->condInput - user set resource list
rei->rsComm->proxyUser.authInfo.authFlag
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0if user set resource is allowed or user is privileged.
USER_DIRECT_RESC_INPUT_ERRif resource is taboo.
Precondition
none
Postcondition
none
See also
none

Definition at line 147 of file reSysDataObjOpr.cpp.

References authInfo_t::authFlag, userInfo_t::authInfo, BACKUP_RESC_NAME_KW, DataObjInp::condInput, DEF_RESC_NAME_KW, DEST_RESC_NAME_KW, RuleExecInfo::doinp, getValByKey(), MsParam::inOutStruct, StrArray::len, LOCAL_PRIV_USER_AUTH, NULL, parseMultiStr(), rsComm_t::proxyUser, RE_TEST_MACRO, RESC_NAME_KW, RuleExecInfo::rsComm, StrArray::size, irods.pypyodbc::status, RuleExecInfo::status, USER_DIRECT_RESC_INPUT_ERR, StrArray::value, and get_irods_version::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetNumThreads()

msiSetNumThreads ( msParam_t xsizePerThrInMbStr,
msParam_t xmaxNumThrStr,
msParam_t xwindowSizeStr,
ruleExecInfo_t rei 
)
Description:\n This microservice specifies the parameters for determining the number of
threads to use for data transfer. It sets the number of threads and the TCP window size.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Note
The msiSetNumThreads function must be present or no thread will be used for all transfer.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xsizePerThrInMbStr- The number of threads is computed using: numThreads = fileSizeInMb / sizePerThrInMb + 1 where sizePerThrInMb is an integer value in MBytes. It also accepts the word "default" which sets sizePerThrInMb to a default value of 32.
[in]xmaxNumThrStr- The maximum number of threads to use. It accepts integer value up to 64. It also accepts the word "default" which sets maxNumThr to a default value of 4.
[in]xwindowSizeStr- The TCP window size in Bytes for the parallel transfer. A value of 0 or "default" means a default size of 1,048,576 Bytes.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doinp->numThreads, rei->doinp->dataSize
Session Variables Modified:\n - rei->rsComm->windowSize (rei->rsComm == NULL, OK),
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 723 of file reSysDataObjOpr.cpp.

References irods::CFG_DEF_NUMBER_TRANSFER_THREADS(), and MsParam::inOutStruct.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetPublicUserOpr()

msiSetPublicUserOpr ( msParam_t xoprList,
ruleExecInfo_t rei 
)
Description:\n This microservice sets a list of operations that can be performed
by the user "public".
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xoprList- Only 2 operations are allowed - "read" - read files; "query" - browse some system level metadata. More than one operation can be input using the character "%" as separator. e.g., readquery.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->rsComm->clientUser.authInfo.authFlag
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 1123 of file reSysDataObjOpr.cpp.

References authInfo_t::authFlag, userInfo_t::authInfo, rsComm_t::clientUser, DATA_GET_AN, DATA_OBJ_CLOSE_AN, DATA_OBJ_GET_AN, DATA_OBJ_LSEEK_AN, DATA_OBJ_OPEN_AN, FILE_CLOSE_AN, FILE_LSEEK_AN, FILE_OPEN_AN, FILE_READ_AN, GEN_QUERY_AN, MsParam::inOutStruct, StrArray::len, LOCAL_PRIV_USER_AUTH, LOG_ERROR, NULL, OBJ_STAT_AN, parseMultiStr(), PUBLIC_USER_AUTH, RE_TEST_MACRO, REMOTE_PRIV_USER_AUTH, rodsLog(), RuleExecInfo::rsComm, setApiPerm(), StrArray::size, irods.pypyodbc::status, RuleExecInfo::status, SYS_NO_API_PRIV, StrArray::value, and get_irods_version::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetRandomScheme()

msiSetRandomScheme ( ruleExecInfo_t rei)
Description:\n This microservice sets the scheme for composing the physical path in the vault to RANDOM. A randomly generated path is appended to the
vaultPath when generating the physical path. e.g., $vaultPath/$userName/$randomPath. The advantage with the RANDOM scheme is renaming operations (imv, irm) are much faster because there is no need to rename the corresponding physical path.
Module:\n core
Since
pre-2.1
Author
- Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->inOutMsParamArray (label==VAULT_PATH_POLICY)
Session Variables Modified:\n - rei->inOutMsParamArray (label==VAULT_PATH_POLICY)
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 1356 of file reSysDataObjOpr.cpp.

References addMsParam(), getMsParamByLabel(), RuleExecInfo::inOutMsParamArray, MsParam::inOutStruct, NULL, RANDOM_S, RE_TEST_MACRO, vaultPathPolicy_t::scheme, RuleExecInfo::status, VAULT_PATH_POLICY, and VaultPathPolicy_MS_T.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetRescQuotaPolicy()

msiSetRescQuotaPolicy ( msParam_t xflag,
ruleExecInfo_t rei 
)
Description:\n This microservice sets the resource quota to on or off.
Module:\n core
Since
2.3
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xflag- Required - a msParam of type STR_MS_T.
  • "on" - enable Resource Quota enforcement
  • "off" - disable Resource Quota enforcement (default)
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n None,
Session Variables Modified:\n RescQuotaPolicy.
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
RESC_QUOTA_OFFor RESC_QUOTA_ON.
Precondition
none
Postcondition
none
See also
none

Definition at line 1477 of file reSysDataObjOpr.cpp.

References MsParam::inOutStruct, RE_TEST_MACRO, RESC_QUOTA_OFF, RESC_QUOTA_ON, RescQuotaPolicy, and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

◆ msiSetRescSortScheme()

msiSetRescSortScheme ( msParam_t xsortScheme,
ruleExecInfo_t rei 
)
Description:\n This microservice sets the scheme for selecting the best resource to use when creating a data object.
Deprecated:
Since 4.0, use a resource composition of a similar type.

Definition at line 105 of file reSysDataObjOpr.cpp.

References LOG_ERROR, rodsLog(), and SYS_NOT_SUPPORTED.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSetReServerNumProc()

msiSetReServerNumProc ( msParam_t xnumProc,
ruleExecInfo_t rei 
)
Description:\n Sets number of processes for the rule engine server
Module:\n core
Since
2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xnumProc- a STR_MS_T representing number of processes
  • this value can be "default" or an integer
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 1419 of file reSysDataObjOpr.cpp.

References irods::CFG_MAX_NUMBER_OF_CONCURRENT_RE_PROCS(), irods::default_max_number_of_concurrent_re_threads, terminate_irods_processes::e, MsParam::inOutStruct, irods::log(), and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSortDataObj()

msiSortDataObj ( msParam_t xsortScheme,
ruleExecInfo_t rei 
)
Description:\n This microservice sorts the copies of the data object using this scheme. Currently, "random" sorting scheme is supported.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xsortScheme- input sorting scheme.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doi
Session Variables Modified:\n - rei->doi
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 364 of file reSysDataObjOpr.cpp.

References RuleExecInfo::doi, MsParam::inOutStruct, NULL, RE_TEST_MACRO, sortDataObjInfoRandom(), and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiStageDataObj()

msiStageDataObj ( msParam_t xcacheResc,
ruleExecInfo_t rei 
)
Description:\n This microservice stages the data object to the specified resource
before operation. It stages a copy of the data object in the cacheResc before opening the data object.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xcacheResc- The resource name in which to cache the object
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doi, rei->doinp->oprType, rei->doinp->openFlags.
Session Variables Modified:\n - rei->doi (new replica queued on top)
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 564 of file reSysDataObjOpr.cpp.

References DataObjInp::condInput, COPY_DEST, COPY_SRC, RuleExecInfo::doinp, getValByKey(), MsParam::inOutStruct, msiSysReplDataObj(), NULL, DataObjInp::oprType, RE_TEST_MACRO, REPL_NUM_KW, REPLICATE_OPR, RESC_NAME_KW, irods.pypyodbc::status, and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSysChksumDataObj()

msiSysChksumDataObj ( ruleExecInfo_t rei)
Description:\n This microservice performs a checksum on the uploaded or copied data object.
Deprecated:
Since 4.2.8, use msiDataObjChksum instead.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doi, rei->rsComm
Session Variables Modified:\n - rei->doi->chksum (the entire link list of doi)
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 415 of file reSysDataObjOpr.cpp.

References LOG_ERROR, rodsLog(), and SYS_NOT_SUPPORTED.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSysMetaModify()

msiSysMetaModify ( msParam_t sysMetadata,
msParam_t value,
ruleExecInfo_t rei 
)
Description:\n Modify system metadata.
Module:\n core
Since
after 2.4.1
Note
This call should only be used through the rcExecMyRule (irule) call i.e., rule execution initiated by clients and should not be called internally by the server since it interacts with the client through the normal client/server socket connection.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]sysMetadata- A STR_MS_T which specifies the system metadata to be modified. Allowed values are: "datatype", "comment", "expirytime". If one wants to modify only the sys metadata for one given replica, the value should be for example // JMC - backport 4573 "comment++++numRepl=2". It will only modify the comment for the replica number 2. If the syntax after "++++" is invalid, it will be ignored and all replica will be modified. This does not work for the "datatype" metadata.
[in]value- A STR_MS_T which specifies the value to be given to the system metadata.
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n none
Session Variables Modified:\n none
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0upon success
Precondition
N/A
Postcondition
N/A
See also
N/A

Definition at line 1700 of file reSysDataObjOpr.cpp.

References addKeyVal(), ALL_KW, checkDateFormat(), DATA_COMMENTS_KW, DATA_EXPIRY_KW, DATA_TYPE_KW, modDataObjMeta_t::dataObjInfo, DATE_FORMAT_ERR, RuleExecInfo::doi, getOffsetTimeStr(), IN_PDMO_KW, MsParam::inOutStruct, LOG_ERROR, MAX_NAME_LEN, NULL, RE_TEST_MACRO, modDataObjMeta_t::regParam, DataObjInfo::replNum, rsComm_t::rError, DataObjInfo::rescHier, rodsLog(), rodsLogAndErrorMsg(), RuleExecInfo::rsComm, rsModDataObjMeta(), rstrcpy(), irods.pypyodbc::status, RuleExecInfo::status, STR_MS_T, SYS_INTERNAL_NULL_INPUT_ERR, TIME_LEN, MsParam::type, UNKNOWN_PARAM_IN_RULE_ERR, USER__NULL_INPUT_ERR, USER_BAD_KEYWORD_ERR, and get_irods_version::value.

Referenced by irods::lookup_table< resource_ptr >::lookup_table().

Here is the call graph for this function:

◆ msiSysReplDataObj()

msiSysReplDataObj ( msParam_t xcacheResc,
msParam_t xflag,
ruleExecInfo_t rei 
)
Description:\n This microservice replicates a data object. It can be used to replicate
a copy of the file just uploaded or copied data object to the specified replResc.
Deprecated:
Since 4.2.8, use msiDataObjRepl instead.
Module:\n core
Since
pre-2.1
Author
Mike Wan
Note
The allFlag is only meaningful if the replResc is a resource group. In this case, setting allFlag to "all" means a copy will be made in all the resources in the resource group. A "null" input means a single copy will be made in one of the resources in the resource group.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xcacheResc-
[in]xflag-
[in,out]rei- The RuleExecInfo structure that is automatically handled by the rule engine. The user does not include rei as a parameter in the rule invocation.
Session Variables Used:\n - rei->doi, rei->doinp->openFlags
Session Variables Modified:\n - rei->doi (new replica queued on top)
iCAT Attributes Used:\n none
iCAT Attributes Modified:\n none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 639 of file reSysDataObjOpr.cpp.

References RuleExecInfo::doi, MsParam::inOutStruct, NULL, RE_TEST_MACRO, RuleExecInfo::rsComm, rsReplAndRequeDataObjInfo(), and RuleExecInfo::status.

Referenced by irods::lookup_table< resource_ptr >::lookup_table(), and msiStageDataObj().

Here is the call graph for this function:

◆ setApiPerm()

int setApiPerm ( int  apiNumber,
int  proxyPerm,
int  clientPerm 
)

Definition at line 1193 of file reSysDataObjOpr.cpp.

References apiTableLookup(), irods::get_server_api_table(), LOCAL_PRIV_USER_AUTH, LOG_ERROR, rodsLog(), RsApiTable, and SYS_INPUT_PERM_OUT_OF_RANGE.

Referenced by msiSetPublicUserOpr().

Here is the call graph for this function: