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.
![]() ![]() |
#include "rcMisc.h"
#include "reSysDataObjOpr.hpp"
#include "genQuery.h"
#include "getRescQuota.h"
#include "dataObjOpr.hpp"
#include "resource.hpp"
#include "physPath.hpp"
#include "rsGenQuery.hpp"
#include "rsModDataObjMeta.hpp"
#include "rsDataObjRepl.hpp"
#include "apiNumber.h"
#include "irodsReServer.hpp"
#include "irods_resource_backport.hpp"
#include "irods_server_api_table.hpp"
#include "irods_server_properties.hpp"
Go to the source code of this file.
int msiDeleteDisallowed | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | on success |
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().
int msiNoChkFilePathPerm | ( | ruleExecInfo_t * | rei | ) |
[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. |
NO_CHK_PATH_PERM |
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().
int msiNoTrashCan | ( | ruleExecInfo_t * | rei | ) |
[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. |
NO_TRASH_CAN |
Definition at line 1084 of file reSysDataObjOpr.cpp.
References NO_TRASH_CAN, and RuleExecInfo::status.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiOprDisallowed | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | on success |
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().
int msiSetBulkPutPostProcPolicy | ( | msParam_t * | xflag, |
ruleExecInfo_t * | rei | ||
) |
[in] | xflag | - Required - a msParam of type STR_MS_T.
|
[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. |
POLICY_OFF | or POLICY_ON |
Definition at line 1643 of file reSysDataObjOpr.cpp.
References MsParam::inOutStruct, POLICY_OFF, POLICY_ON, RE_TEST_MACRO, and RuleExecInfo::status.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiSetChkFilePathPerm | ( | msParam_t * | xchkType, |
ruleExecInfo_t * | rei | ||
) |
[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. |
DO_CHK_PATH_PERM,NO_CHK_PATH_PERM,CHK_NON_VAULT_PATH_PERM | or DISALLOW_PATH_REG. |
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().
int msiSetDataObjAvoidResc | ( | msParam_t * | xavoidResc, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSetDataObjPreferredResc | ( | msParam_t * | xpreferredRescList, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSetDataTypeFromExt | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | on success |
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().
int msiSetDefaultResc | ( | msParam_t * | xdefaultRescList, |
msParam_t * | xoptionStr, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSetGraftPathScheme | ( | msParam_t * | xaddUserName, |
msParam_t * | xtrimDirCnt, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSetMultiReplPerResc | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | on success |
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().
int msiSetNoDirectRescInp | ( | msParam_t * | xrescList, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | if user set resource is allowed or user is privileged. |
USER_DIRECT_RESC_INPUT_ERR | if resource is taboo. |
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().
int msiSetNumThreads | ( | msParam_t * | xsizePerThrInMbStr, |
msParam_t * | xmaxNumThrStr, | ||
msParam_t * | xwindowSizeStr, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSetPublicUserOpr | ( | msParam_t * | xoprList, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSetRandomScheme | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | on success |
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().
int msiSetReplComment | ( | msParam_t * | inpParam1, |
msParam_t * | inpParam2, | ||
msParam_t * | inpParam3, | ||
msParam_t * | inpParam4, | ||
ruleExecInfo_t * | rei | ||
) |
[in] | inpParam1 | - a STR_MS_T with the id of the object (can be null if unknown, the next param will then be used) |
[in] | inpParam2 | - a msParam of type DataObjInp_MS_T or a STR_MS_T which would be taken as dataObj path |
[in] | inpParam3 | - a INT which gives the replica number |
[in] | inpParam4 | - a STR_MS_T containing the comment |
[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. |
0 | on success |
Definition at line 1529 of file reSysDataObjOpr.cpp.
References addKeyVal(), DATA_COMMENTS_KW, DataObjInfo::dataId, modDataObjMeta_t::dataObjInfo, IN_PDMO_KW, LOG_ERROR, LOG_NOTICE, NULL, DataObjInfo::objPath, parseMspForPosInt(), parseMspForStr(), RE_TEST_MACRO, modDataObjMeta_t::regParam, DataObjInfo::replNum, DataObjInfo::rescHier, rodsLog(), RuleExecInfo::rsComm, rsModDataObjMeta(), RuleExecInfo::status, SYS_INTERNAL_NULL_INPUT_ERR, and USER__NULL_INPUT_ERR.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiSetRescQuotaPolicy | ( | msParam_t * | xflag, |
ruleExecInfo_t * | rei | ||
) |
[in] | xflag | - Required - a msParam of type STR_MS_T.
|
[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. |
RESC_QUOTA_OFF | or RESC_QUOTA_ON. |
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().
int msiSetRescSortScheme | ( | msParam_t * | , |
ruleExecInfo_t * | |||
) |
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().
int msiSetReServerNumProc | ( | msParam_t * | xnumProc, |
ruleExecInfo_t * | rei | ||
) |
[in] | xnumProc | - a STR_MS_T representing number of processes
|
[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. |
0 | on success |
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().
int msiSortDataObj | ( | msParam_t * | xsortScheme, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiStageDataObj | ( | msParam_t * | xcacheResc, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
int msiSysChksumDataObj | ( | ruleExecInfo_t * | rei | ) |
[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. |
0 | on success |
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().
int msiSysMetaModify | ( | msParam_t * | sysMetadata, |
msParam_t * | value, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | upon success |
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().
int msiSysReplDataObj | ( | msParam_t * | xcacheResc, |
msParam_t * | xflag, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
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().
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().