irods  4.3.0
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.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

reAction.hpp File Reference
Include dependency graph for reAction.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  irods
 

Functions

int msiRollback (ruleExecInfo_t *rei)
 
int msiSetACL (msParam_t *recursiveFlag, msParam_t *accessLevel, msParam_t *userName, msParam_t *pathName, ruleExecInfo_t *rei)
 
int print_hello (ruleExecInfo_t *c)
 
int print_hello_arg (msParam_t *xs, ruleExecInfo_t *rei)
 
int delayExec (msParam_t *condition, msParam_t *workflow, msParam_t *recoverWorkFlow, ruleExecInfo_t *rei)
 
int remoteExec (msParam_t *hostName, msParam_t *condition, msParam_t *workflow, msParam_t *recoverWorkFlow, ruleExecInfo_t *rei)
 
int msiSleep (msParam_t *sec, msParam_t *microsec, ruleExecInfo_t *rei)
 
int writeBytesBuf (msParam_t *where, msParam_t *inBuf, ruleExecInfo_t *rei)
 
int writePosInt (msParam_t *where, msParam_t *inInt, ruleExecInfo_t *rei)
 
int writeKeyValPairs (msParam_t *where, msParam_t *inKVPair, msParam_t *separator, ruleExecInfo_t *rei)
 
int msiGetDiffTime (msParam_t *inpParam1, msParam_t *inpParam2, msParam_t *inpParam3, msParam_t *outParam, ruleExecInfo_t *rei)
 
int msiGetSystemTime (msParam_t *outParam, msParam_t *inpParam, ruleExecInfo_t *rei)
 
int msiGetFormattedSystemTime (msParam_t *outParam, msParam_t *inpParam, msParam_t *inpFormatParam, ruleExecInfo_t *rei)
 
int msiHumanToSystemTime (msParam_t *inpParam, msParam_t *outParam, ruleExecInfo_t *rei)
 
int msiStrToBytesBuf (msParam_t *str_msp, msParam_t *buf_msp, ruleExecInfo_t *rei)
 
int msiBytesBufToStr (msParam_t *buf_msp, msParam_t *str_msp, ruleExecInfo_t *rei)
 
int msiApplyDCMetadataTemplate (msParam_t *inpParam, msParam_t *outParam, ruleExecInfo_t *rei)
 
int msiListEnabledMS (msParam_t *outKVPairs, ruleExecInfo_t *rei)
 
int msiSetResource (msParam_t *xrescName, ruleExecInfo_t *rei)
 
int msiPrintKeyValPair (msParam_t *where, msParam_t *inKVPair, ruleExecInfo_t *rei)
 
int msiGetValByKey (msParam_t *inKVPair, msParam_t *inKey, msParam_t *outVal, ruleExecInfo_t *rei)
 
int msiAddKeyVal (msParam_t *inKeyValPair, msParam_t *key, msParam_t *value, ruleExecInfo_t *rei)
 
int msiExecStrCondQuery (msParam_t *queryParam, msParam_t *genQueryOutParam, ruleExecInfo_t *rei)
 
int msiExecGenQuery (msParam_t *genQueryInParam, msParam_t *genQueryOutParam, ruleExecInfo_t *rei)
 
int msiMakeQuery (msParam_t *selectListParam, msParam_t *conditionsParam, msParam_t *queryOutParam, ruleExecInfo_t *rei)
 
int msiMakeGenQuery (msParam_t *selectListStr, msParam_t *condStr, msParam_t *genQueryInpParam, ruleExecInfo_t *rei)
 
int msiGetMoreRows (msParam_t *genQueryInp_msp, msParam_t *genQueryOut_msp, msParam_t *continueInx, ruleExecInfo_t *rei)
 
int msiCloseGenQuery (msParam_t *genQueryInp_msp, msParam_t *genQueryOut_msp, ruleExecInfo_t *rei)
 
int msiAddSelectFieldToGenQuery (msParam_t *select, msParam_t *function, msParam_t *queryInput, ruleExecInfo_t *rei)
 
int msiAddConditionToGenQuery (msParam_t *attribute, msParam_t *coperator, msParam_t *value, msParam_t *queryInput, ruleExecInfo_t *rei)
 
int msiPrintGenQueryOutToBuffer (msParam_t *queryOut, msParam_t *format, msParam_t *buffer, ruleExecInfo_t *rei)
 
int msiQuota (ruleExecInfo_t *rei)
 
int msiDeleteUnusedAVUs (ruleExecInfo_t *rei)
 
int msiGoodFailure (ruleExecInfo_t *rei)
 
int msiCheckPermission (msParam_t *perm, ruleExecInfo_t *rei)
 
int msiCheckAccess (msParam_t *inObjName, msParam_t *inOperation, msParam_t *outResult, ruleExecInfo_t *rei)
 
int msiCheckOwner (ruleExecInfo_t *rei)
 
int msiCreateUser (ruleExecInfo_t *rei)
 
int msiCreateCollByAdmin (msParam_t *parColl, msParam_t *childName, ruleExecInfo_t *rei)
 
int msiCommit (ruleExecInfo_t *rei)
 
int msiDeleteCollByAdmin (msParam_t *parColl, msParam_t *childName, ruleExecInfo_t *rei)
 
int msiDeleteUser (ruleExecInfo_t *rei)
 
int msiAddUserToGroup (msParam_t *msParam, ruleExecInfo_t *rei)
 
int msiSendMail (msParam_t *toAddr, msParam_t *subjectLine, msParam_t *body, ruleExecInfo_t *rei)
 
int msiGetObjType (msParam_t *objNameP, msParam_t *objTypeP, ruleExecInfo_t *rei)
 
int msiAssociateKeyValuePairsToObj (msParam_t *mDP, msParam_t *objP, msParam_t *typP, ruleExecInfo_t *rei)
 
int msiSetKeyValuePairsToObj (msParam_t *mDP, msParam_t *objP, msParam_t *typP, ruleExecInfo_t *rei)
 
int msiExtractTemplateMDFromBuf (msParam_t *sOP, msParam_t *tSP, msParam_t *mDP, ruleExecInfo_t *rei)
 
int msiReadMDTemplateIntoTagStruct (msParam_t *sOP, msParam_t *tSP, ruleExecInfo_t *rei)
 
int msiFreeBuffer (msParam_t *memP, ruleExecInfo_t *rei)
 
int msiGetIcatTime (msParam_t *timeOutParam, msParam_t *typeInParam, ruleExecInfo_t *rei)
 
int msiGetTaggedValueFromString (msParam_t *inTagParag, msParam_t *inStrParam, msParam_t *outValueParam, ruleExecInfo_t *rei)
 
int recover_print_hello (ruleExecInfo_t *c)
 
int recover_msiCreateUser (ruleExecInfo_t *rei)
 
int recover_msiCreateCollByAdmin (msParam_t *parColl, msParam_t *childName, ruleExecInfo_t *rei)
 
int msiString2KeyValPair (msParam_t *inBufferP, msParam_t *outKeyValPairP, ruleExecInfo_t *rei)
 
int msiStrArray2String (msParam_t *inSAParam, msParam_t *outStr, ruleExecInfo_t *rei)
 
int msiAW1 (msParam_t *mPIn, msParam_t *mPOut2, ruleExecInfo_t *rei)
 
int msiRenameLocalZone (msParam_t *oldName, msParam_t *newName, ruleExecInfo_t *rei)
 
int msiRenameCollection (msParam_t *oldName, msParam_t *newName, ruleExecInfo_t *rei)
 
int msiRenameLocalZoneCollection (msParam_t *_new_zone_name, ruleExecInfo_t *_rei)
 
int msiAclPolicy (msParam_t *msParam, ruleExecInfo_t *rei)
 
int msiSetQuota (msParam_t *type, msParam_t *name, msParam_t *resource, msParam_t *value, ruleExecInfo_t *rei)
 
int msiRemoveKeyValuePairsFromObj (msParam_t *metadataParam, msParam_t *objParam, msParam_t *typeParam, ruleExecInfo_t *rei)
 
int msiModAVUMetadata (msParam_t *_item_type, msParam_t *_item_name, msParam_t *_avu_op, msParam_t *_attr_name, msParam_t *_attr_val, msParam_t *_attr_unit, ruleExecInfo_t *_rei)
 
int msiPrintGenQueryInp (msParam_t *where, msParam_t *genQueryInpParam, ruleExecInfo_t *rei)
 
int msiGetContInxFromGenQueryOut (msParam_t *genQueryOutParam, msParam_t *continueInx, ruleExecInfo_t *rei)
 
int msiSetReplComment (msParam_t *inpParam1, msParam_t *inpParam2, msParam_t *inpParam3, msParam_t *inpParam4, ruleExecInfo_t *rei)
 
int msiSetBulkPutPostProcPolicy (msParam_t *xflag, ruleExecInfo_t *rei)
 
int msiCutBufferInHalf (msParam_t *mPIn, ruleExecInfo_t *rei)
 
int msiDoSomething (msParam_t *inParam, msParam_t *outParam, ruleExecInfo_t *rei)
 
int msiString2StrArray (msParam_t *inBufferP, msParam_t *outStrArrayP, ruleExecInfo_t *rei)
 
int msiTakeThreeArgumentsAndDoNothing (msParam_t *arg1, msParam_t *arg2, msParam_t *arg3, ruleExecInfo_t *rei)
 

Function Documentation

◆ delayExec()

int delayExec ( msParam_t condition,
msParam_t workflow,
msParam_t recoverWorkFlow,
ruleExecInfo_t rei 
)

◆ msiAclPolicy()

msiAclPolicy ( msParam_t msParam,
ruleExecInfo_t rei 
)
Description:\n When called (e.g. from acAclPolicy) and with "STRICT" as the
argument, this will set the ACL policy (for GeneralQuery) to be extended (most strict).
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. Once set STRICT, strict mode remains in force (users can't call it in another rule to change the mode back to non-strict). See core.re.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]msParam- a msParam of type STR_MS_T - can have value 'STRICT'
[in,out]-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:
Session Variables Modified:
iCAT Attributes Used:
iCAT Attributes Modified:
Side Effect:\n none
Returns
integer
Return values
status
Precondition
none
Postcondition
none
See also
none

Definition at line 592 of file icatAdminMS.cpp.

References chlGenQueryAccessControlSetup(), irods::error::code(), get_catalog_service_role(), if(), MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_PROVIDER, NULL, irods::error::ok(), PASS, and irods::STRICT_ACL_KW.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiAddConditionToGenQuery()

msiAddConditionToGenQuery ( msParam_t attribute,
msParam_t opr,
msParam_t value,
msParam_t queryInput,
ruleExecInfo_t rei 
)
Description:\n Adds a condition to a genQueryInp_t
Module:
core
Note
This microservice adds a condition to an existing genQueryInp_t, from three parameters. One is an iCAT attribute index given without its 'COL_' prefix. The second one is the SQL operator. The third one is the value and may contain wildcards. To be used with msiAddSelectFieldToGenQuery and msiExecGenQuery to build queries from the results of other microservices or actions within an iRODS rule.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]attribute- Required - A STR_MS_T with the iCAT attribute name (see wiki.irods.org/index.php/icatAttributes).
[in]opr- Required - A STR_MS_T with the operator.
[in]value- Required - A STR_MS_T with the value.
[in,out]queryInput- Required - A GenQueryInp_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 804 of file genQueryMS.cpp.

References addInxVal(), GenQueryInp_MS_T, getAttrIdFromAttrName(), MsParam::inOutStruct, LOG_ERROR, MAX_NAME_LEN, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, GenQueryInp::sqlCondInp, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiAddKeyVal()

msiAddKeyVal ( msParam_t inKeyValPair,
msParam_t key,
msParam_t value,
ruleExecInfo_t rei 
)
Description:\n Adds a new key and value to a keyValPair_t
Module:
core
Note
A new keyValPair_t is created if inKeyValPair is NULL.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in,out]inKeyValPair- Optional - a KeyValPair_MS_T
[in]key- Required - A STR_MS_T containing the key
[in]value- Optional - A STR_MS_T containing the value
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 361 of file keyValPairMS.cpp.

References addKeyVal(), MsParam::inOutStruct, KeyValPair_MS_T, LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, RuleExecInfo::status, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiAddSelectFieldToGenQuery()

msiAddSelectFieldToGenQuery ( msParam_t select,
msParam_t function,
msParam_t queryInput,
ruleExecInfo_t rei 
)
Description:\n Sets a select field in a genQueryInp_t
Module:
core
Note
This microservice sets a select field in a genQueryInp_t, from two parameters. One is an iCAT attribute index given without its 'COL_' prefix. The second one is the optional SQL operator. A new genQueryInp_t is created if queryInput is NULL. Followed with msiExecGenQuery, msiAddSelectFieldToGenQuery allows to take the results of other microservices to build and execute queries within a rule.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]select- Required - A STR_MS_T with the select field.
[in]function- Optional - A STR_MS_T with the function. Valid values are [MIN|MAX|SUM|AVG|COUNT]
[in,out]queryInput- Optional - A GenQueryInp_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 695 of file genQueryMS.cpp.

References addInxIval(), GenQueryInp_MS_T, getAttrIdFromAttrName(), getSelVal(), MsParam::inOutStruct, LOG_ERROR, MAX_SQL_ROWS, GenQueryInp::maxRows, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, GenQueryInp::selectInp, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiAddUserToGroup()

msiAddUserToGroup ( msParam_t msParam,
ruleExecInfo_t rei 
)
Description:\n This microservice adds a user to a group
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]msParam- a msParam of type STR_MS_T, the name of the group
[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:
rei->rsComm->clientUser (must be group admin)
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
(i)
Precondition
none
Postcondition
none
See also
none

Definition at line 314 of file icatAdminMS.cpp.

References chlModGroup(), irods::error::code(), get_catalog_service_role(), i, MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), UserInfo::rodsZone, RuleExecInfo::rsComm, RuleExecInfo::uoio, UserInfo::userName, and UserInfo::userType.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiApplyDCMetadataTemplate()

msiApplyDCMetadataTemplate ( msParam_t inpParam,
msParam_t outParam,
ruleExecInfo_t rei 
)
Description:\n This microservice adds 15 empty Dublin Core Metadata fields to an object or collection.
Module:
framework
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inpParam- a STR_MS_T containing the target object's path
[out]outParam- an INT_MS_T containing the status
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 159 of file miscMS.cpp.

References ModifyAVUMetadataInput::arg0, ModifyAVUMetadataInput::arg1, ModifyAVUMetadataInput::arg2, ModifyAVUMetadataInput::arg3, ModifyAVUMetadataInput::arg4, ModifyAVUMetadataInput::arg5, fillIntInMsParam(), getObjType(), i, LOG_ERROR, NAME_LEN, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, and rsModAVUMetadata().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiAssociateKeyValuePairsToObj()

msiAssociateKeyValuePairsToObj ( msParam_t metadataParam,
msParam_t objParam,
msParam_t typeParam,
ruleExecInfo_t rei 
)
Description:\n This microservice associates <key,value> p pairs
from a given keyValPair_t structure with an object.
Module:
framework
Since
pre-2.1
Note
The object type is also needed:
  • -d for data object
  • -R for resource
  • -C for collection
  • -u for user
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]metadataParam- a msParam of type KeyValPair_MS_T
[in]objParam- a msParam of type STR_MS_T
[in]typeParam- 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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
AVU pairs are associated with an iRODS object
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameters don't match the type from addAVUMetadataFromKVPairs
Precondition
none
Postcondition
none
See also
addAVUMetadataFromKVPairs

Definition at line 429 of file extractAvuMS.cpp.

References addAVUMetadataFromKVPairs(), i, MsParam::inOutStruct, KeyValPair_MS_T, RE_TEST_MACRO, RuleExecInfo::rsComm, STR_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiAW1()

int msiAW1 ( msParam_t mPIn,
msParam_t mPOut2,
ruleExecInfo_t rei 
)

◆ msiBytesBufToStr()

msiBytesBufToStr ( msParam_t buf_msp,
msParam_t str_msp,
ruleExecInfo_t rei 
)
Description:\n Writes a bytesBuf_t into a character string
Module:
core
Since
3.3
Remarks
This may blow up if the buffer is not a character string. so be careful
Note
The string can have length up to BUF_LEN_MS_T
Example Usage:\n

testrule{ msiBytesBufToStr(*Buff, *St) writeLine(stdout,*St) } ruleExecOut

Parameters
[in]buf_msp- a BUF_LEN_MS_T
[out]str_msp- a STR_MS_T
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 889 of file nre.systemMS.cpp.

References BytesBuf::buf, fillStrInMsParam(), MsParam::inOutStruct, MsParam::inpOutBuf, irods::KW_CFG_MAX_SIZE_FOR_SINGLE_BUFFER, BytesBuf::len, LOG_ERROR, NULL, rodsLog(), and strncpy().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCheckAccess()

msiCheckAccess ( msParam_t inObjName,
msParam_t inOperation,
msParam_t outResult,
ruleExecInfo_t rei 
)
Description:\n This microservice checks the access permission to perform a given operation
Module:
core
Since
3.0
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inObjName- name of Object. A param of type STR_MS_T
[in]inOperation- type of Operation that will be performed. A param of type STR_MS_T.
[out]outResult- result of the operation. 0 for failure and 1 for success. a param of type INT_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 263 of file icatGeneralMS.cpp.

References checkPermissionByObjType(), RsComm::clientUser, fillIntInMsParam(), getObjType(), i, MsParam::inOutStruct, MAX_NAME_LEN, NULL, RE_TEST_MACRO, UserInfo::rodsZone, RuleExecInfo::rsComm, STR_MS_T, MsParam::type, and UserInfo::userName.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCheckOwner()

msiCheckOwner ( ruleExecInfo_t rei)
Description:\n This microservice checks whether the user is the owner
Module:
core
Since
pre-2.1
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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 178 of file icatGeneralMS.cpp.

References DataObjInfo::dataOwnerName, DataObjInfo::dataOwnerZone, RuleExecInfo::doi, UserInfo::rodsZone, RuleExecInfo::uoic, and UserInfo::userName.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCheckPermission()

msiCheckPermission ( msParam_t xperm,
ruleExecInfo_t rei 
)
Description:\n This microservice checks the authorization permission (whether or not permission is granted)
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xperm- 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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 218 of file icatGeneralMS.cpp.

References DataObjInfo::dataAccess, RuleExecInfo::doi, if(), MsParam::inOutStruct, and NULL.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCloseGenQuery()

int msiCloseGenQuery ( msParam_t genQueryInp_msp,
msParam_t genQueryOut_msp,
ruleExecInfo_t rei 
)
Description:\n This microservice closes an unfinished query. This is based on the code from #msiGetMoreRows.
Module:
core
Since
3.1
Example Usage:\n None
Parameters
[in]genQueryInp_msp- Required - a GenQueryInp_MS_T containing the query parameters and conditions.
[in]genQueryOut_msp- Required - a GenQueryOut_MS_T to write results to. If its continuation index is 0 the query will be closed.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 391 of file genQueryMS.cpp.

◆ msiCommit()

msiCommit ( ruleExecInfo_t rei)
Description:\n This microservice commits pending database transactions,
registering the new state information into the iCAT.
Module:
core
Since
pre-2.1
Note
This is used to commit changes (in any) into the iCAT database as part of a rule and microservice chain. See core.re for examples. In other cases, iCAT updates and inserts are automatically committed into the iCAT Database as part of the normal operations (in the 'C' code).
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:
none
Session Variables Modified:
none
iCAT Attributes Used:
commits pending updates (if any)
iCAT Attributes Modified:
pending updates (if any) are committed into the iCAT db
Side Effect:\n none
Returns
integer
Return values
(status)
Precondition
none
Postcondition
none
See also
none

Definition at line 349 of file icatGeneralMS.cpp.

References chlCommit(), irods::error::code(), get_catalog_service_role(), irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCreateCollByAdmin()

msiCreateCollByAdmin ( msParam_t xparColl,
msParam_t xchildName,
ruleExecInfo_t rei 
)
Description:\n This microservice creates a collection by an administrator
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xparColl- a msParam of type STR_MS_T
[in]xchildName- 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.
Session Variables Used:
rei->rsComm->clientUser.authFlag (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
(i)
Precondition
none
Postcondition
none
See also
none

Definition at line 110 of file icatAdminMS.cpp.

References chlRegCollByAdmin(), irods::error::code(), CollInfo::collName, CollInfo::collOwnerName, CollInfo::collOwnerZone, get_catalog_service_role(), i, MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), UserInfo::rodsZone, RuleExecInfo::rsComm, RuleExecInfo::uoio, and UserInfo::userName.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCreateUser()

msiCreateUser ( ruleExecInfo_t rei)
Description:\n This microservice creates a new user
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
From the irods wiki: https://wiki.irods.org/index.php/Rules
The "acCreateUser" rule, for example, calls "msiCreateUser". If that succeeds it invokes the "acCreateDefaultCollections" rule (which calls other rules and msi routines). Then, if they all succeed, the "msiCommit" function is called to save persistent state information.
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:
rei->rsComm->clientUser.authFlag (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
i
Precondition
none
Postcondition
none
See also
none

Definition at line 53 of file icatAdminMS.cpp.

References chlRegUserRE(), irods::error::code(), get_catalog_service_role(), i, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), RuleExecInfo::rsComm, and RuleExecInfo::uoio.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiCutBufferInHalf()

int msiCutBufferInHalf ( msParam_t mPIn,
ruleExecInfo_t rei 
)

◆ msiDeleteCollByAdmin()

msiDeleteCollByAdmin ( msParam_t xparColl,
msParam_t xchildName,
ruleExecInfo_t rei 
)
Description:\n This microservice deletes a collection by administrator
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xparColl- a msParam of type STR_MS_T
[in]xchildName- 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.
Session Variables Used:
rei->rsComm->clientUser.authFlag (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
(i)
Precondition
none
Postcondition
none
See also
none

Definition at line 180 of file icatAdminMS.cpp.

References chlDelCollByAdmin(), irods::error::code(), CollInfo::collName, CollInfo::collOwnerName, CollInfo::collOwnerZone, freeRErrorContent(), get_catalog_service_role(), i, MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, RsComm::rError, rodsLog(), UserInfo::rodsZone, RuleExecInfo::rsComm, RuleExecInfo::uoio, and UserInfo::userName.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiDeleteUnusedAVUs()

msiDeleteUnusedAVUs ( ruleExecInfo_t rei)
Description:\n This microservice deletes unused AVUs from the iCAT. See 'iadmin rum'.
Module:
core
Since
post-2.3
Note
See 'iadmin help rum'. Do not call this directly.
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:
rei->rsComm->clientUser.authFlag (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
check AVU table
iCAT Attributes Modified:
update AVU table
Side Effect:\n none
Returns
integer
Return values
(status)
Precondition
none
Postcondition
none
See also
none

Definition at line 588 of file icatGeneralMS.cpp.

References chlDelUnusedAVUs(), irods::error::code(), get_catalog_service_role(), irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, LOG_NOTICE, irods::error::ok(), PASS, rodsLog(), and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiDeleteUser()

msiDeleteUser ( ruleExecInfo_t rei)
Description:\n This microservice deletes a user
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
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:
rei->rsComm->clientUser.authFlag (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
(i)
Precondition
none
Postcondition
none
See also
none

Definition at line 258 of file icatAdminMS.cpp.

References chlDelUserRE(), irods::error::code(), get_catalog_service_role(), i, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), RuleExecInfo::rsComm, and RuleExecInfo::uoio.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiDoSomething()

msiDoSomething ( msParam_t inParam,
msParam_t outParam,
ruleExecInfo_t rei 
)
Description:\n Placeholder for microservice code to test.
Module:
core
Since
3.0.x
Note
This empty microservice is to be filled with your own code. It can serve as a platform for quickly testing server API functions and related code. Input and output parameters can be of any type, depending on how they are parsed and set up in msiDoSomething. A quick and dirty way to examine critical variables without firing gdb is to create a keyValPair_t*, dump data in it throughout the code with addKeyVal(), return it through outParam and follow with writeKeyValPairs.
Example Usage:\n doSomething {
msiDoSomething("", *keyValOut); writeKeyValPairs("stdout", *keyValOut, ": "); } INPUT null OUTPUT ruleExecOut
Parameters
[out]-A KeyValPair_MS_T (by default).
[out]outParam- A KeyValPair_MS_T (by 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:
None
Session Variables Modified:
None
iCAT Attributes Used:
None
iCAT Attributes Modified:
None
Side Effect:\n None
Returns
integer
Return values
0on success
Precondition
None
Postcondition
None
See also
None

Definition at line 112 of file testMS.cpp.

References MsParam::inOutStruct, KeyValPair_MS_T, LOG_ERROR, NULL, RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiExecGenQuery()

int msiExecGenQuery ( msParam_t genQueryInParam,
msParam_t genQueryOutParam,
ruleExecInfo_t rei 
)
Description:\n This function executes a given general query structure and returns results
Module:
core
Since
pre-2.1
Note
Takes a SQL-like iRODS query (no FROM clause) and returns a table structure. Use msiGetMoreRows to get all rows.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]genQueryInParam- a msParam of type GenQueryInp_MS_T
[out]genQueryOutParam- a msParam of type GenQueryOut_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiGetMoreRows and msiExecStrCondQuery

Definition at line 113 of file genQueryMS.cpp.

◆ msiExecStrCondQuery()

msiExecStrCondQuery ( msParam_t queryParam,
msParam_t genQueryOutParam,
ruleExecInfo_t rei 
)
Description:\n This function takes a given condition string, creates an iCAT query, executes it and returns the values
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]queryParam- a msParam of type GenQueryInp_MS_T
[out]genQueryOutParam- a msParam of type GenQueryOut_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 44 of file genQueryMS.cpp.

References GenQueryInp::continueInx, fillGenQueryInpFromStrCond(), GenQueryOut_MS_T, i, MsParam::inOutStruct, MAX_NAME_LEN, MAX_SQL_ROWS, GenQueryInp::maxRows, NULL, RuleExecInfo::rsComm, rsGenQuery(), strcpy(), and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiExtractTemplateMDFromBuf()

msiExtractTemplateMDFromBuf ( msParam_t bufParam,
msParam_t tagParam,
msParam_t metadataParam,
ruleExecInfo_t rei 
)
Description:\n This microservice parses a buffer containing metadata
and uses the tags to identify Key-Value Pairs.
Module:
core
Since
pre-2.1
Remarks
Terrell Russell - msi documentation, 2009-06-17
Note
The template structure identifies triplets <pre-string-regexp,post-string-regexp,keyword> and the metadata buffer is searched for the pre and post regular expressions and the string between them is associated with the keyword. A.l <key,value> pairs found are stored in keyValPair_t structure.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]bufParam- a msParam of type BUF_MS_T
[in]tagParam- a msParam of type TagStruct_MS_T
[out]metadataParam- a msParam of type KeyValPair_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameter doesn't match the type
INVALID_REGEXPif the tags are not correct
fromaddKeyVal
Precondition
none
Postcondition
none
See also
addKeyVal

Definition at line 301 of file extractAvuMS.cpp.

References addKeyVal(), BytesBuf::buf, BUF_LEN_MS_T, clearKeyVal(), i, MsParam::inOutStruct, MsParam::inpOutBuf, KeyValPair_MS_T, TagStruct::keyWord, TagStruct::len, BytesBuf::len, LOG_NOTICE, NULL, TagStruct::postTag, TagStruct::preTag, RE_TEST_MACRO, rodsLog(), TagStruct_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiFreeBuffer()

msiFreeBuffer ( msParam_t memoryParam,
ruleExecInfo_t rei 
)
Description:\n This microservice frees a named buffer, including stdout and stderr
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]memoryParam- the buffer to free
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 479 of file nre.systemMS.cpp.

References BytesBuf::buf, getMsParamByLabel(), if(), MsParam::inOutStruct, MsParam::inpOutBuf, BytesBuf::len, RuleExecInfo::msParamArray, NULL, RE_TEST_MACRO, ExecCmdOut::stderrBuf, ExecCmdOut::stdoutBuf, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetContInxFromGenQueryOut()

msiGetContInxFromGenQueryOut ( msParam_t genQueryOutParam,
msParam_t continueInx,
ruleExecInfo_t rei 
)
Description:\n This microservice gets the continue index value from genQueryOut generated by msiExecGenQuery
Module:
core
Since
2.2
Note
The resulting continueInx can be used to determine whether there are remaining rows to retrieve from the generated query.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]genQueryOutParam- Required - of type GenQueryOut_MS_T.
[out]continueInx- a INT_MS_T containing the new continuation index (after the query).
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiExecGenQuery, msiGetMoreRows

Definition at line 173 of file genQueryMS.cpp.

References GenQueryOut::continueInx, fillIntInMsParam(), GenQueryOut_MS_T, MsParam::inOutStruct, LOG_ERROR, RE_TEST_MACRO, rodsLog(), and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetDiffTime()

msiGetDiffTime ( msParam_t inpParam1,
msParam_t inpParam2,
msParam_t inpParam3,
msParam_t outParam,
ruleExecInfo_t rei 
)
Description:\n This microservice returns the difference between two system times
Module:
framework
Since
2.1
Note
If we have arithmetic MSs in the future we should use DOUBLE_MS_T instead of strings. Default output format is in seconds, use 'human' as the third input param for human readable format.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inpParam1- a STR_MS_T containing the start date (system time in seconds)
[in]inpParam2- a STR_MS_T containing the end date (system time in seconds)
[in]inpParam3- Optional - a STR_MS_T containing the desired output format
[out]outParam- a STR_MS_T containing the time elapsed between the two dates
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 600 of file nre.systemMS.cpp.

References fillStrInMsParam(), if(), MsParam::inOutStruct, LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, and TIME_LEN.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetFormattedSystemTime()

msiGetFormattedSystemTime ( msParam_t outParam,
msParam_t inpParam,
msParam_t inpFormatParam,
ruleExecInfo_t rei 
)
Description:\n Returns the local system time, formatted
Module:
core
Since
pre-2.1
Note
Default output format is system time in seconds. Use 'human' as input parameter for human readable format.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[out]outParam- a STR_MS_T containing the time
[in]inpParam- Optional - a STR_MS_T containing the desired output format (human)
[in]inpFormatParam- Optional - a STR_MS_T containing printf formatting (if inpParam was human)
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 1048 of file nre.systemMS.cpp.

References fillStrInMsParam(), getNowStr(), MsParam::inOutStruct, LOG_ERROR, NULL, RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, and TIME_LEN.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetIcatTime()

msiGetIcatTime ( msParam_t timeOutParam,
msParam_t typeInParam,
ruleExecInfo_t rei 
)
Description:\n This function returns the system time for the iCAT server
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[out]timeOutParam- a msParam of type STR_MS_T
[in]typeInParam- a msParam of type STR_MS_T
  • "icat" or "unix" will return seconds since epoch
  • otherwise, human friendly
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 45 of file icatGeneralMS.cpp.

References fillStrInMsParam(), getLocalTimeFromRodsTime(), getNowStr(), if(), MsParam::inOutStruct, TIME_LEN, and type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetMoreRows()

int msiGetMoreRows ( msParam_t genQueryInp_msp,
msParam_t genQueryOut_msp,
msParam_t continueInx,
ruleExecInfo_t rei 
)
Description:\n This microservice continues an unfinished query.
Module:
core
Since
pre-2.1
Note
This microservice gets the next batch of rows for an open iCAT query. Likely to follow msiMakeGenQuery and msiExecGenQuery.
Example Usage:\n None
Parameters
[in]genQueryInp_msp- Required - a GenQueryInp_MS_T containing the query parameters and conditions.
[in]genQueryOut_msp- Required - a GenQueryOut_MS_T to write results to. If its continuation index is 0 the query will be closed.
[out]continueInx- a INT_MS_T containing the new continuation index (after the query).
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 288 of file genQueryMS.cpp.

◆ msiGetObjType()

msiGetObjType ( msParam_t objParam,
msParam_t typeParam,
ruleExecInfo_t rei 
)
Description:\n This microservice gets an object's type from the iCAT.
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]objParam- a msParam of type STR_MS_T, the path of the iRODS object
[out]typeParam- a msParam of type STR_MS_T, will be set by this microservice
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameter doesn't match the type
getObjType
Precondition
none
Postcondition
none
See also
none

Definition at line 560 of file extractAvuMS.cpp.

References getObjType(), i, MsParam::inOutStruct, MAX_NAME_LEN, RE_TEST_MACRO, RuleExecInfo::rsComm, STR_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetSystemTime()

msiGetSystemTime ( msParam_t outParam,
msParam_t inpParam,
ruleExecInfo_t rei 
)
Description:\n This microservice returns the local system time
Module:
framework
Since
pre-2.1
Note
Default output format is system time in seconds, use 'human' as input param for human readable format.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[out]outParam- a STR_MS_T containing the time
[in]inpParam- Optional - a STR_MS_T containing the desired output format
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 690 of file nre.systemMS.cpp.

References fillStrInMsParam(), getLocalTimeFromRodsTime(), getNowStr(), if(), MsParam::inOutStruct, LOG_ERROR, NULL, RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, and TIME_LEN.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetTaggedValueFromString()

msiGetTaggedValueFromString ( msParam_t inTagParam,
msParam_t inStrParam,
msParam_t outValueParam,
ruleExecInfo_t rei 
)
Description:\n This microservice gets a tagged value from a string; given a tag-name gets the value from a file in tagged-format (pseudo-XML).
Module:
core
Since
pre-2.1
Note
This performs some regular expression matching. Given a regular expression as a tag-value 't', it identifies the corresponding string in the match string with a string that matches a sub-string value: '<t>.*</t>'. The service is used for processing a tagged structure.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inTagParam- a msParam of type STR_MS_T
[in]inStrParam- a msParam of type STR_MS_T
[out]outValueParam- a msParam of type INT_MS_T
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 199 of file extractAvuMS.cpp.

References fillMsParam(), MsParam::inOutStruct, LOG_NOTICE, NULL, rodsLog(), and STR_MS_T.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGetValByKey()

int msiGetValByKey ( msParam_t _kvp,
msParam_t _key,
msParam_t _out_value,
ruleExecInfo_t _rei 
)
Description:\n Given a list of KVPairs and a Key, this microservice gets the corresponding value.
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]_kvpThis msParam is of type KeyValPair_PI which is a KeyValPair List.
[in]_keyThis msParam is of type STR_MS_T which is a key.
[out]_out_valueThis msParam is of type STR_MS_T which is a value corresponding to key.
[in,out]_reiThe 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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 37 of file keyValPairMS.cpp.

References fillStrInMsParam(), getValByKey(), MsParam::inOutStruct, KeyValPair_MS_T, MsParam::label, LOG_ERROR, RE_TEST_MACRO, rodsLog(), STR_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiGoodFailure()

msiGoodFailure ( ruleExecInfo_t rei)
Description:\n This microservice fails on purpose.
Module:
core
Since
pre-2.1
Note
This microservice performs no operations but fails the current rule application immediately even if the body still has some more microservices. But other definitions of the rule are not retried upon this failure. It is useful when you want to fail but no recovery initiated.
Example Usage:\n See clients/icommands/test/rules/
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
negativenumber
Precondition
none
Postcondition
none
See also
fail

Definition at line 425 of file nre.systemMS.cpp.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiHumanToSystemTime()

msiHumanToSystemTime ( msParam_t inpParam,
msParam_t outParam,
ruleExecInfo_t rei 
)
Description:\n Converts a human readable date to a system timestamp
Module:
framework
Since
pre-2.1
Note
Expects an input date in the form: YYYY-MM-DD-hh.mm.ss
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inpParam- a STR_MS_T containing the input date
[out]outParam- a STR_MS_T containing the timestamp
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 753 of file nre.systemMS.cpp.

References fillStrInMsParam(), localToUnixTime(), LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, RuleExecInfo::status, and TIME_LEN.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiListEnabledMS()

msiListEnabledMS ( msParam_t outKVPairs,
ruleExecInfo_t rei 
)
Description:\n Returns the list of compiled microservices on the local iRODS server
Module:
framework
Since
2.1
Note
This microservice looks at reAction.hpp and returns the list of compiled microservices on the local iRODS server. The results are written to a KeyValPair_MS_T. For each pair the keyword is the MS name while the value is the module where the microservice belongs. Standard non-module microservices are listed as "core".
Example Usage:\n See clients/icommands/test/rules/
Parameters
[out]outKVPairs- A KeyValPair_MS_T containing the results.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 955 of file nre.systemMS.cpp.

References addKeyVal(), irods::lookup_table< ValueType, KeyType, HashType >::begin(), irods::error::code(), irods::lookup_table< ValueType, KeyType, HashType >::end(), fillMsParam(), KeyValPair_MS_T, irods::KW_CFG_PLUGIN_TYPE_MICROSERVICE, irods::plugin_name_generator::list_plugins(), LOG_ERROR, NULL, irods::error::ok(), PASS, RE_TEST_MACRO, irods::resolve_plugin_path(), rodsLog(), and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiMakeGenQuery()

msiMakeGenQuery ( msParam_t selectListStr,
msParam_t condStr,
msParam_t genQueryInpParam,
ruleExecInfo_t rei 
)
Description:\n This microservice sets up a GenQueryInp_MS_T from a list of parameters and conditions
Module:
core
Since
pre-2.1
Note
This microservice sets up a genQueryInp_t data structure needed by calls to rsGenQuery(). To be used before msiExecGenQuery and msiGetMoreRows.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]selectListStr- Required - a STR_MS_T containing the parameters.
[in]condStr- Required - a STR_MS_T containing the conditions
[out]genQueryInpParam- a GenQueryInp_MS_T containing the parameters and conditions.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 494 of file genQueryMS.cpp.

References _makeQuery(), GenQueryInp::continueInx, fillGenQueryInpFromStrCond(), freeGenQueryInp(), GenQueryInp_MS_T, MsParam::inOutStruct, LOG_ERROR, MAX_NAME_LEN, MAX_SQL_ROWS, GenQueryInp::maxRows, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, RuleExecInfo::status, strcpy(), and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiMakeQuery()

msiMakeQuery ( msParam_t selectListParam,
msParam_t conditionsParam,
msParam_t queryOutParam,
ruleExecInfo_t rei 
)
Description:\n Creates sql query from parameter list and conditions.
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]selectListParam- a STR_MS_T containing the parameters.
[in]conditionsParam- a STR_MS_T containing the conditions.
[out]queryOutParam- a STR_MS_T containing the parameters and conditions as sql.
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiGetMoreRows and msiExecStrCondQuery

Definition at line 240 of file genQueryMS.cpp.

References _makeQuery(), i, MsParam::inOutStruct, STR_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiModAVUMetadata()

msiModAVUMetadata ( msParam_t _item_type,
msParam_t _item_name,
msParam_t _avu_op,
msParam_t _attr_name,
msParam_t _attr_val,
msParam_t _attr_unit,
ruleExecInfo_t rei 
)
Module:
core
Since
4.2.7
Description:\n This microservice adds, modifies, or removes AVUs on an item
Note
The item type is also needed:
  • -d for data object
  • -R for resource
  • -C for collection
  • -u for user
avu_op is one of:
  • "add"
  • "set"
  • "rm"
  • "rmw"
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]item_type- a msParam of type STR_MS_T
[in]item_name- a msParam of type STR_MS_T
[in]avu_op- a msParam of type STR_MS_T
[in]attrNameParam- a msParam of type STR_MS_T
[in]attrValueParam- a msParam of type STR_MS_T
[in]attrUnitsParam- 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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
AVU triples add / set / rm / rmw (rm-with-wildcard)
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameter doesn't match the type
fromrsModAVUMetadata
Precondition
none
Postcondition
none
See also
rsModAVUMetadata

Definition at line 712 of file extractAvuMS.cpp.

References ModifyAVUMetadataInput::arg0, ModifyAVUMetadataInput::arg1, ModifyAVUMetadataInput::arg2, ModifyAVUMetadataInput::arg3, ModifyAVUMetadataInput::arg4, ModifyAVUMetadataInput::arg5, parseMspForStr(), RuleExecInfo::rsComm, rsModAVUMetadata(), and RuleExecInfo::status.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiPrintGenQueryInp()

msiPrintGenQueryInp ( msParam_t where,
msParam_t genQueryInpParam,
ruleExecInfo_t rei 
)
Description:\n This microservice prints the given GenQueryInp_MS_T to the given target buffer
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]where- Required - a STR_MS_T containing the parameters.
[in]genQueryInpParam- Required - a GenQueryInp_MS_T containing the parameters and conditions.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
writeString

Definition at line 590 of file genQueryMS.cpp.

References _writeString(), i, MsParam::inOutStruct, InxIvalPair::inx, InxValPair::inx, MsParam::label, InxIvalPair::len, InxValPair::len, len, LOG_ERROR, MAX_NAME_LEN, NULL, RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, GenQueryInp::selectInp, GenQueryInp::sqlCondInp, InxIvalPair::value, and InxValPair::value.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiPrintGenQueryOutToBuffer()

msiPrintGenQueryOutToBuffer ( msParam_t queryOut,
msParam_t format,
msParam_t buffer,
ruleExecInfo_t rei 
)
Description:\n Writes the contents of a GenQueryOut_MS_T into a BUF_LEN_MS_T.
Module:
core
Note
This microservice writes the contents of a GenQueryOut_MS_T into a BUF_LEN_MS_T. The results can be formatted with an optional C-style format string the same way it is done in iquest.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]queryOut- Required - A GenQueryOut_MS_T.
[in]format- Optional - A STR_MS_T with a C-style format string, like in iquest.
[out]buffer- A BUF_LEN_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 915 of file genQueryMS.cpp.

References appendToByteBuf(), fillBufLenInMsParam(), GenQueryOut_MS_T, MsParam::inOutStruct, BytesBuf::len, LOG_ERROR, MAX_NAME_LEN, NULL, parseMspForStr(), printGenQueryOut(), RE_TEST_MACRO, resetMsParam(), rodsLog(), RuleExecInfo::rsComm, RuleExecInfo::status, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiPrintKeyValPair()

msiPrintKeyValPair ( msParam_t where,
msParam_t inkvpair,
ruleExecInfo_t rei 
)
Description:\n Prints key-value pairs to rei's stdout separated by " = "
Module:
core
Since
pre-2.1
Note
msiExecStrCondQuery is used to run the query: "SELECT DATA_NAME, DATA_REPL_NUM, DATA_CHECKSUM WHERE DATA_NAME LIKE 'foo%'". The result is printed using msiPrintKeyValPair, which prints each row as an attribute-value pair.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]where- a msParam of type STR_MS_T which is either stderr or stdout.
[in]inkvpair- a msParam of type KeyValPair_PI which is a KeyValPair list (structure).
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 111 of file keyValPairMS.cpp.

References i, MsParam::inOutStruct, k, l, NULL, RE_TEST_MACRO, and writeString().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiQuota()

msiQuota ( ruleExecInfo_t rei)
Description:\n Calculates storage usage and sets quota values (over/under/how-much).
Module:
core
Since
pre-2.3
Note
Causes the iCAT quota tables to be updated.
This is run via an admin rule
Example Usage:\n See clients/icommands/test/rules/ and https://wiki.irods.org/index.php/Quotas
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:
rei->rsComm->clientUser.authFlag (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
Utilizes ICAT data-object information
iCAT Attributes Modified:
Updates the quota tables
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 94 of file icatGeneralMS.cpp.

References chlCalcUsageAndQuota(), irods::error::code(), get_catalog_service_role(), irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_NOTICE, irods::error::ok(), PASS, rodsLog(), and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiReadMDTemplateIntoTagStruct()

msiReadMDTemplateIntoTagStruct ( msParam_t bufParam,
msParam_t tagParam,
ruleExecInfo_t rei 
)
Description:\n This microservice parses a buffer containing a template-style file
and stores the tags in a tag structure.
Note
The template buffer should contain triples of the form: <PRETAG>re1</PRETAG>kw<POSTTAG>re2</POSTTAG>. re1 identifies the pre-string and re2 identifies the post-string and any value between re1 and re2 in a metadata buffer can be associated with keyword kw.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]bufParam- a msParam of type BUF_LEN_MS_T
[out]tagParam- a return msParam of type TagStruct_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameter doesn't match the type
INVALID_REGEXPif the tags are not correct
NO_VALUES_FOUNDif there are no tags identified
fromaddTagStruct
Precondition
none
Postcondition
none
See also
addTagStruct

Definition at line 59 of file extractAvuMS.cpp.

References addTagStruct(), BytesBuf::buf, BUF_LEN_MS_T, i, MsParam::inOutStruct, MsParam::inpOutBuf, TagStruct::len, BytesBuf::len, LOG_NOTICE, NULL, RE_TEST_MACRO, rodsLog(), TagStruct_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiRemoveKeyValuePairsFromObj()

msiRemoveKeyValuePairsFromObj ( msParam_t metadataParam,
msParam_t objParam,
msParam_t typeParam,
ruleExecInfo_t rei 
)
Module:
core
Since
pre-2.1
Description:\n This microservice removes with an object <key,value> p pairs
from a given keyValPair_t structure.
Note
The object type is also needed:
  • -d for data object
  • -R for resource
  • -C for collection
  • -u for user
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]metadataParam- a msParam of type KeyValPair_MS_T
[in]objParam- a msParam of type STR_MS_T
[in]typeParam- 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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
AVU pairs removed
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameter doesn't match the type
fromremoveAVUMetadataFromKVPairs
Precondition
none
Postcondition
none
See also
removeAVUMetadataFromKVPairs

Definition at line 628 of file extractAvuMS.cpp.

References i, MsParam::inOutStruct, KeyValPair_MS_T, RE_TEST_MACRO, removeAVUMetadataFromKVPairs(), RuleExecInfo::rsComm, STR_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiRenameCollection()

msiRenameCollection ( msParam_t oldName,
msParam_t newName,
ruleExecInfo_t rei 
)
Description:\n This function renames a collection; used via a Rule with #msiRenameLocalZone
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]oldName- a msParam of type STR_MS_T
[in]newName- 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.
Session Variables Used:
rei->rsComm->clientUser (must have access (admin))
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
status
Precondition
none
Postcondition
none
See also
none

Definition at line 439 of file icatAdminMS.cpp.

References get_catalog_service_role(), MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, irods::error::ok(), PASS, and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiRenameLocalZone()

msiRenameLocalZone ( msParam_t oldName,
msParam_t newName,
ruleExecInfo_t rei 
)
Description:\n This microservice renames the local zone by updating various tables
Module:
core
Since
pre-2.1
Note
Should not be used outside of the rules defined in core.re. This is called via an 'iadmin' command.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]oldName- a msParam of type STR_MS_T
[in]newName- 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.
Session Variables Used:
rei->rsComm->clientUser (must be admin)
Session Variables Modified:
none
iCAT Attributes Used:
checks various tables
iCAT Attributes Modified:
updates various tables
Side Effect:\n none
Returns
integer
Return values
status
Precondition
none
Postcondition
none
See also
none

Definition at line 378 of file icatAdminMS.cpp.

References chlRenameLocalZone(), irods::error::code(), get_catalog_service_role(), MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiRenameLocalZoneCollection()

int msiRenameLocalZoneCollection ( msParam_t _new_zone_name,
ruleExecInfo_t _rei 
)

Renames the local zone collection.

Parameters
[in]_new_zone_nameThe new name for the zone collection. The new name must not exist.
[in]_reiThe RuleExecInfo managed by the system. This parameter must be ignored.
Returns
An integer.
Return values
0On success.
Non-zeroOtherwise.
Since
4.2.9

Definition at line 500 of file icatAdminMS.cpp.

References chlCommit(), chlRenameColl(), chlRollback(), get_catalog_service_role(), MsParam::inOutStruct, irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, RsComm::myEnv, irods::error::ok(), PASS, RodsEnvironment::rodsZone, and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiRollback()

msiRollback ( ruleExecInfo_t rei)
Description:\n This function deletes user and collection information from the iCAT by rolling back the database transaction
Module:
core
Since
pre-2.1
Note
This is used to not-commit changes into the iCAT database as part of a rule and microservice chain. See core.re for examples. In other cases, iCAT updates and inserts are automatically rolled-back as part of the normal operations.
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:
none
Session Variables Modified:
none
iCAT Attributes Used:
pending updates (if any) are canceled
iCAT Attributes Modified:
pending updates (if any) are canceled
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 405 of file icatGeneralMS.cpp.

References chlRollback(), irods::error::code(), get_catalog_service_role(), irods::KW_CFG_SERVICE_ROLE_CONSUMER, irods::KW_CFG_SERVICE_ROLE_PROVIDER, LOG_ERROR, irods::error::ok(), PASS, rodsLog(), and RuleExecInfo::rsComm.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSendMail()

msiSendMail ( msParam_t xtoAddr,
msParam_t xsubjectLine,
msParam_t xbody,
ruleExecInfo_t rei 
)
Description:\n Sends email
Module:
core
Since
pre-2.1
Note
This microservice sends e-mail using the mail command in the unix system. No attachments are supported. The sender of the e-mail is the unix user-id running the irodsServer.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xtoAddr- a msParam of type STR_MS_T which is an address of the receiver.
[in]xsubjectLine- a msParam of type STR_MS_T which is a subject of the message.
[in]xbody- a msParam of type STR_MS_T which is a body of the message.
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n An e-mail sent to the specified recipient.
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 45 of file mailMS.cpp.

References checkStringForEmailAddress(), checkStringForSystem(), ERROR, if(), MsParam::inOutStruct, LOG_ERROR, LOG_NOTICE, NULL, and rodsLog().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSetACL()

msiSetACL ( msParam_t recursiveFlag,
msParam_t accessLevel,
msParam_t userName,
msParam_t pathName,
ruleExecInfo_t rei 
)
Description:\n This microservice changes the ACL for a given pathname,
either a collection or a data object.
Module:
core
Since
2.3
Note
This microservice modifies the access rights on a given iRODS object or collection. For the collections, the modification can be recursive and the inheritance bit can be changed as well. For admin mode, add MOD_ADMIN_MODE_PREFIX to the access level string, e.g: msiSetACL("default", "admin:read", "rods", *path)
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]recursiveFlag- a STR_MS_T, either "default" or "recursive".
[in]accessLevel- a STR_MS_T containing one of the following:
  • read
  • write
  • own
  • inherit
  • null
[in]userName- a STR_MS_T, the user name or group name who will have ACL changed.
[in]pathName- a STR_MS_T, the collection or data object that will have its ACL changed.
[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:
$userName and/or $objPath and/or $collName
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
N/A
Postcondition
N/A
See also
N/A

Definition at line 472 of file icatGeneralMS.cpp.

References modAccessControlInp_t::accessLevel, if(), MsParam::inOutStruct, LOG_ERROR, LOG_NOTICE, NAME_LEN, NULL, modAccessControlInp_t::path, RE_TEST_MACRO, modAccessControlInp_t::recursiveFlag, RsComm::rError, rodsLog(), rodsLogAndErrorMsg(), UserInfo::rodsZone, RuleExecInfo::rsComm, rsModAccessControl(), RuleExecInfo::status, STR_MS_T, strncpy(), MsParam::type, RuleExecInfo::uoic, modAccessControlInp_t::userName, and modAccessControlInp_t::zone.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSetBulkPutPostProcPolicy()

msiSetBulkPutPostProcPolicy ( msParam_t xflag,
ruleExecInfo_t rei 
)
Description:\n This microservice sets whether the post processing "put"
rule (acPostProcForPut) should be run (on or off) for the bulk put operation.
Module:
core
Since
2.4
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xflag- Required - a msParam of type STR_MS_T.
  • "on" - enable execution of acPostProcForPut.
  • "off" - disable execution of acPostProcForPut.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
POLICY_OFFor POLICY_ON
Precondition
none
Postcondition
none
See also
none

Definition at line 1311 of file reSysDataObjOpr.cpp.

References MsParam::inOutStruct, POLICY_OFF, POLICY_ON, RE_TEST_MACRO, and RuleExecInfo::status.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSetKeyValuePairsToObj()

msiSetKeyValuePairsToObj ( msParam_t metadataParam,
msParam_t objParam,
msParam_t typeParam,
ruleExecInfo_t rei 
)
Description:\n This microservice associates or modifies <key,value> p pairs
from a given keyValPair_t structure with an object.
Module:
framework
Since
3.1
Note
The object type is also needed:
  • -d for data object
  • -R for resource
  • -C for collection
  • -u for user
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]metadataParam- a msParam of type KeyValPair_MS_T
[in]objParam- a msParam of type STR_MS_T
[in]typeParam- 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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
AVU pairs are associated with an iRODS object
Side Effect:\n none
Returns
integer
Return values
0on success
USER_PARAM_TYPE_ERRwhen input parameters don't match the type from addAVUMetadataFromKVPairs
Precondition
none
Postcondition
none
See also

Definition at line 501 of file extractAvuMS.cpp.

References MsParam::inOutStruct, KeyValPair_MS_T, RE_TEST_MACRO, RuleExecInfo::rsComm, setAVUMetadataFromKVPairs(), STR_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSetQuota()

msiSetQuota ( msParam_t type,
msParam_t name,
msParam_t resource,
msParam_t value,
ruleExecInfo_t rei 
)
Description:\n Sets disk usage quota for a user or group
Module:
core
Since
3.0.x
Note
This microservice sets a disk usage quota for a given user or group. If no resource name is provided the quota will apply across all resources.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]type- a STR_MS_T - Can be either "user" or "group"
[in]name- a STR_MS_T with the name of the user or group
[in]resource- Optional - a STR_MS_T with the name of the resource where the quota will apply, or "total" for the quota to be system-wide.
[in]value- an INT_MST_T or DOUBLE_MS_T or STR_MS_T with the quota (in 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:
rei->uoic->authInfo.authFlag must be >= 5 (local admin)
Session Variables Modified:
None
iCAT Attributes Used:
None
iCAT Attributes Modified:
Updates r_quota_main
Side Effect:\n None
Returns
integer
Return values
0on success
Precondition
None
Postcondition
None
See also
None

Definition at line 669 of file icatAdminMS.cpp.

References generalAdminInp_t::arg0, generalAdminInp_t::arg1, generalAdminInp_t::arg2, generalAdminInp_t::arg3, generalAdminInp_t::arg4, generalAdminInp_t::arg5, generalAdminInp_t::arg6, generalAdminInp_t::arg7, generalAdminInp_t::arg8, generalAdminInp_t::arg9, AuthInfo::authFlag, UserInfo::authInfo, DOUBLE_MS_T, INT_MS_T, LOCAL_PRIV_USER_AUTH, LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, rsGeneralAdmin(), STR_MS_T, type, RuleExecInfo::uoic, and UserInfo::userName.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSetReplComment()

msiSetReplComment ( msParam_t inpParam1,
msParam_t inpParam2,
msParam_t inpParam3,
msParam_t inpParam4,
ruleExecInfo_t rei 
)
Description:\n This microservice sets the data_comments attribute of a data object.
Module:
core
Since
2.4
Note
Can be called by client through irule
Example Usage:\n See clients/icommands/test/rules/
Parameters
[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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 1197 of file reSysDataObjOpr.cpp.

References addKeyVal(), DATA_COMMENTS_KW, DataObjInfo::dataId, ModDataObjMetaInp::dataObjInfo, IN_PDMO_KW, LOG_ERROR, LOG_NOTICE, NULL, DataObjInfo::objPath, parseMspForPosInt(), parseMspForStr(), RE_TEST_MACRO, ModDataObjMetaInp::regParam, DataObjInfo::replNum, DataObjInfo::rescHier, rodsLog(), RuleExecInfo::rsComm, rsModDataObjMeta(), and RuleExecInfo::status.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSetResource()

msiSetResource ( msParam_t xrescName,
ruleExecInfo_t rei 
)
Description:\n This microservice sets the resource as part of a workflow execution.
Module:
core
Since
pre-2.1
Note
This microservice sets the resource as part of a workflow execution.
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]xrescName- is 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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 140 of file icatGeneralMS.cpp.

References RuleExecInfo::doi, MsParam::inOutStruct, and DataObjInfo::rescName.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiSleep()

msiSleep ( msParam_t secPtr,
msParam_t microsecPtr,
ruleExecInfo_t rei 
)
Description:\n Sleep for some amount of time
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]secPtr- secPtr is a msParam of type STR_MS_T which is seconds
[in]microsecPtr- microsecPrt is a msParam of type STR_MS_T which is microseconds
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 553 of file nre.systemMS.cpp.

References MsParam::inOutStruct, and rodsSleep().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiStrArray2String()

msiStrArray2String ( msParam_t inSAParam,
msParam_t outStr,
ruleExecInfo_t rei 
)
Description:\n Array of Strings converted to a string separated by %-signs
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inSAParam- a msParam of type strArr_MS_T which is an array of strings.
[out]outStr- a msParam of type STR_MS_T which a string with %-separators.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiString2KeyValPair

Definition at line 304 of file keyValPairMS.cpp.

References i, MsParam::inOutStruct, StrArray::len, RE_TEST_MACRO, StrArray::size, STR_MS_T, MsParam::type, and StrArray::value.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiString2KeyValPair()

msiString2KeyValPair ( msParam_t inBufferP,
msParam_t outKeyValPairP,
ruleExecInfo_t rei 
)
Description:\n This microservice converts a %-separated key=value pair strings into keyValPair structure.
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inBufferP- a msParam of type STR_MS_T which is key=value pairs separated by %-sign.
[out]outKeyValPairP- a msParam of type KeyValPair_MS_T which is a keyValuePair structure.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiStrArray2String

Definition at line 176 of file keyValPairMS.cpp.

References addKeyVal(), buf, i, MsParam::inOutStruct, KeyValPair_MS_T, StrArray::len, NULL, parseMultiStr(), RE_TEST_MACRO, StrArray::size, MsParam::type, and StrArray::value.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiString2StrArray()

msiString2StrArray ( msParam_t inBufferP,
msParam_t outStrArrayP,
ruleExecInfo_t rei 
)
Description:\n This microservice converts a %-separated strings into strArr_t structure.
Module:
core
Since
3.0
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]inBufferP- a msParam of type STR_MS_T which is key=value pairs separated by %-sign.
[out]outStrArrayP- a msParam of type StrArray_MS_T which is a structure of array of string.
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
msiStrArray2String

Definition at line 246 of file keyValPairMS.cpp.

References buf, i, MsParam::inOutStruct, NULL, parseMultiStr(), RE_TEST_MACRO, STR_MS_T, StrArray_MS_T, and MsParam::type.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiStrToBytesBuf()

msiStrToBytesBuf ( msParam_t str_msp,
msParam_t buf_msp,
ruleExecInfo_t rei 
)
Description:\n Converts a string to a bytesBuf_t
Module:
core
Since
pre-2.1
Note
For easily passing parameters to microservices that require a BUF_LEN_MS_T
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]str_msp- a STR_MS_T
[out]buf_msp- a BUF_LEN_MS_T
[in,out]-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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 824 of file nre.systemMS.cpp.

References BytesBuf::buf, fillBufLenInMsParam(), BytesBuf::len, LOG_ERROR, NULL, parseMspForStr(), and rodsLog().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ msiTakeThreeArgumentsAndDoNothing()

int msiTakeThreeArgumentsAndDoNothing ( msParam_t arg1,
msParam_t arg2,
msParam_t arg3,
ruleExecInfo_t rei 
)

◆ print_hello()

int print_hello ( ruleExecInfo_t c)

rodsLog(LOG_NOTICE, "TTTTT Hello\n"); rodsLogAndErrorMsg(LOG_NOTICE, &(rei->rsComm->rError),-1, "VVVVV Hello\n");

Definition at line 4 of file testMS.cpp.

References _writeString(), and RE_TEST_MACRO.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ print_hello_arg()

int print_hello_arg ( msParam_t xs,
ruleExecInfo_t rei 
)

◆ recover_msiCreateCollByAdmin()

int recover_msiCreateCollByAdmin ( msParam_t parColl,
msParam_t childName,
ruleExecInfo_t rei 
)

◆ recover_msiCreateUser()

int recover_msiCreateUser ( ruleExecInfo_t rei)

◆ recover_print_hello()

int recover_print_hello ( ruleExecInfo_t c)

◆ remoteExec()

◆ writeBytesBuf()

writeBytesBuf ( msParam_t where,
msParam_t inBuf,
ruleExecInfo_t rei 
)
Description:\n This microservice writes the buffer in an inOutStruct to stdout or stderr.
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]where- a msParam of type STR_MS_T which is the buffer name in ruleExecOut. It can be stdout or stderr.
[in]inBuf- a msParam of type BUF_LEN_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.
Session Variables Used:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 161 of file printMS.cpp.

References _writeString(), BytesBuf::buf, MsParam::inOutStruct, MsParam::inpOutBuf, MsParam::label, BytesBuf::len, NULL, and strncpy().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ writeKeyValPairs()

writeKeyValPairs ( msParam_t where,
msParam_t inKVPair,
msParam_t separator,
ruleExecInfo_t rei 
)
Description:\n This microservice writes keyword value pairs to stdout or stderr, using the given separator.
Module:
core
Since
2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]where- a msParam of type STR_MS_T which is the buffer name in ruleExecOut. It can be stdout or stderr.
[in]inKVPair- a msParam of type KeyValPair_MS_T
[in]separator- Optional - a msParam of type STR_MS_T, the desired parameter
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 223 of file printMS.cpp.

References _writeString(), i, if(), MsParam::inOutStruct, KeyValPair_MS_T, KeyValPair::keyWord, MsParam::label, KeyValPair::len, LOG_ERROR, MAX_COND_LEN, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), size, RuleExecInfo::status, MsParam::type, and KeyValPair::value.

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().

◆ writePosInt()

writePosInt ( msParam_t where,
msParam_t inInt,
ruleExecInfo_t rei 
)
Description:\n This microservice writes a positive integer into a buffer.
Module:
core
Since
pre-2.1
Example Usage:\n See clients/icommands/test/rules/
Parameters
[in]where- a msParam of type STR_MS_T which is the buffer name in ruleExecOut.
[in]inInt- the integer to write
[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:
none
Session Variables Modified:
none
iCAT Attributes Used:
none
iCAT Attributes Modified:
none
Side Effect:\n none
Returns
integer
Return values
0on success
Precondition
none
Postcondition
none
See also
none

Definition at line 106 of file printMS.cpp.

References _writeString(), MsParam::inOutStruct, MsParam::label, LONG_NAME_LEN, NULL, and parseMspForPosInt().

Referenced by irods::lookup_table< ValueType, KeyType, HashType >::lookup_table().