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 <string.h>
#include <time.h>
#include "rsRuleExecSubmit.hpp"
#include "icatHighLevelRoutines.hpp"
#include "rcMisc.h"
#include "execMyRule.h"
#include "region.h"
#include "irods_plugin_name_generator.hpp"
#include "irods_load_plugin.hpp"
#include "sockComm.h"
#include "rsRuleExecDel.hpp"
#include "ruleExecDel.h"
#include "rsExecMyRule.hpp"
#include "irods_server_properties.hpp"
#include "irods_log.hpp"
#include "irods_re_structs.hpp"
#include "irods_ms_plugin.hpp"
#include <string>
#include <vector>
Go to the source code of this file.
Variables | |
static std::vector< std::string > | GlobalDelayExecStack |
int _delayExec | ( | const char * | inActionCall, |
const char * | recoveryActionCall, | ||
const char * | delayCondition, | ||
ruleExecInfo_t * | rei | ||
) |
Definition at line 158 of file nre.systemMS.cpp.
References clearBBuf(), fillSubmitConditions(), GlobalDelayExecStack, MAX_NUM_OF_ARGS_IN_ACTION, NULL, packReiAndArg(), RuleExecInfo::pluginInstanceName, RE_TEST_MACRO, RuleExecInfo::rsComm, rsRuleExecSubmit(), and set_plugin_instance_name().
Referenced by delayExec(), exec_rule_text(), and smsi_delayExec().
|
static |
Definition at line 232 of file nre.systemMS.cpp.
References addMsParamToArray(), getMsParamByLabel(), MsParam::inOutStruct, MsParam::inpOutBuf, MsParam::label, MsParamArray::len, LOG_ERROR, MsParamArray::msParam, NULL, replBytesBuf(), replInOutStruct(), rodsLogError(), irods.pypyodbc::status, and MsParam::type.
Referenced by remoteExec().
int checkFilePerms | ( | char * | fileName | ) |
int delayExec | ( | msParam_t * | mPA, |
msParam_t * | mPB, | ||
msParam_t * | mPC, | ||
ruleExecInfo_t * | rei | ||
) |
Definition at line 111 of file nre.systemMS.cpp.
References _delayExec(), MsParam::inOutStruct, MAX_ACTION_SIZE, and rstrcpy().
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int doForkExec | ( | char * | prog, |
char * | arg1 | ||
) |
Definition at line 364 of file nre.systemMS.cpp.
References checkFilePerms(), and pid_age::pid.
int fillSubmitConditions | ( | const char * | action, |
const char * | inDelayCondition, | ||
bytesBuf_t * | packedReiAndArgBBuf, | ||
ruleExecSubmitInp_t * | ruleSubmitInfo, | ||
ruleExecInfo_t * | rei | ||
) |
Definition at line 490 of file irods_re_structs.cpp.
References run_tests::action, addKeyVal(), checkDateFormat(), rsComm_t::clientUser, ruleExecSubmitInp_t::condInput, terminate_irods_processes::e, ruleExecSubmitInp_t::estimateExeTime, ruleExecSubmitInp_t::exeAddress, ruleExecSubmitInp_t::exeFrequency, ruleExecSubmitInp_t::exeTime, getOffsetTimeStr(), getTaggedValues(), INPUT_ARG_NOT_WELL_FORMED_ERR, INSTANCE_NAME_KW, KeyValPair::keyWord, KeyValPair::len, irods::log(), NAME_LEN, ruleExecSubmitInp_t::notificationAddr, ruleExecSubmitInp_t::packedReiAndArgBBuf, ruleExecSubmitInp_t::priority, RuleExecInfo::rsComm, ruleExecSubmitInp_t::ruleName, TIME_LEN, RuleExecInfo::uoic, ruleExecSubmitInp_t::userName, userInfo_t::userName, and KeyValPair::value.
Referenced by _delayExec().
std::map<std::string, std::vector<std::string> > getTaggedValues | ( | const char * | str | ) |
Definition at line 462 of file irods_re_structs.cpp.
References INPUT_ARG_NOT_WELL_FORMED_ERR, and THROW.
Referenced by fillSubmitConditions(), and set_plugin_instance_name().
int msiBytesBufToStr | ( | msParam_t * | buf_msp, |
msParam_t * | str_msp, | ||
ruleExecInfo_t * | |||
) |
testrule{ msiBytesBufToStr(*Buff, *St) writeLine(stdout,*St) } ruleExecOut
[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. |
0 | on success |
Definition at line 900 of file nre.systemMS.cpp.
References BytesBuf::buf, irods::CFG_MAX_SIZE_FOR_SINGLE_BUFFER(), terminate_irods_processes::e, fillStrInMsParam(), MsParam::inOutStruct, MsParam::inpOutBuf, BytesBuf::len, irods::log(), LOG_ERROR, NULL, rodsLog(), USER__NULL_INPUT_ERR, and USER_INPUT_FORMAT_ERR.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiFreeBuffer | ( | msParam_t * | memoryParam, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
Definition at line 490 of file nre.systemMS.cpp.
References BytesBuf::buf, getMsParamByLabel(), MsParam::inOutStruct, MsParam::inpOutBuf, BytesBuf::len, RuleExecInfo::msParamArray, NULL, RE_TEST_MACRO, ExecCmdOut::stderrBuf, ExecCmdOut::stdoutBuf, and MsParam::type.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiGetDiffTime | ( | msParam_t * | inpParam1, |
msParam_t * | inpParam2, | ||
msParam_t * | inpParam3, | ||
msParam_t * | outParam, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
Definition at line 611 of file nre.systemMS.cpp.
References fillStrInMsParam(), MsParam::inOutStruct, LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, SYS_INTERNAL_NULL_INPUT_ERR, TIME_LEN, and USER__NULL_INPUT_ERR.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiGetFormattedSystemTime | ( | msParam_t * | outParam, |
msParam_t * | inpParam, | ||
msParam_t * | inpFormatParam, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
Definition at line 1059 of file nre.systemMS.cpp.
References fillStrInMsParam(), getNowStr(), MsParam::inOutStruct, LOG_ERROR, NULL, RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, SYS_INTERNAL_NULL_INPUT_ERR, and TIME_LEN.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiGetSystemTime | ( | msParam_t * | outParam, |
msParam_t * | inpParam, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
Definition at line 701 of file nre.systemMS.cpp.
References fillStrInMsParam(), getLocalTimeFromRodsTime(), getNowStr(), MsParam::inOutStruct, LOG_ERROR, NULL, RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, SYS_INTERNAL_NULL_INPUT_ERR, and TIME_LEN.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiGoodFailure | ( | ruleExecInfo_t * | ) |
negative | number |
Definition at line 436 of file nre.systemMS.cpp.
References RETRY_WITHOUT_RECOVERY_ERR.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiHumanToSystemTime | ( | msParam_t * | inpParam, |
msParam_t * | outParam, | ||
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
Definition at line 764 of file nre.systemMS.cpp.
References fillStrInMsParam(), localToUnixTime(), LOG_ERROR, NULL, parseMspForStr(), RE_TEST_MACRO, rodsLog(), RuleExecInfo::rsComm, RuleExecInfo::status, SYS_INTERNAL_NULL_INPUT_ERR, and TIME_LEN.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiListEnabledMS | ( | msParam_t * | outKVPairs, |
ruleExecInfo_t * | rei | ||
) |
[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. |
0 | on success |
Definition at line 966 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::plugin_name_generator::list_plugins(), irods::log(), LOG_ERROR, NULL, irods::error::ok(), PASS, irods::PLUGIN_TYPE_MICROSERVICE(), RE_TEST_MACRO, irods::resolve_plugin_path(), run_tests::results, rodsLog(), RuleExecInfo::rsComm, and SYS_INTERNAL_NULL_INPUT_ERR.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiSleep | ( | msParam_t * | secPtr, |
msParam_t * | microsecPtr, | ||
ruleExecInfo_t * | |||
) |
[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. |
0 | on success |
Definition at line 564 of file nre.systemMS.cpp.
References MsParam::inOutStruct, and rodsSleep().
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int msiStrToBytesBuf | ( | msParam_t * | str_msp, |
msParam_t * | buf_msp, | ||
ruleExecInfo_t * | |||
) |
[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. |
0 | on success |
Definition at line 835 of file nre.systemMS.cpp.
References BytesBuf::buf, fillBufLenInMsParam(), BytesBuf::len, LOG_ERROR, NULL, parseMspForStr(), rodsLog(), and USER__NULL_INPUT_ERR.
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
int recover_delayExec | ( | msParam_t * | , |
msParam_t * | , | ||
ruleExecInfo_t * | rei | ||
) |
Definition at line 205 of file nre.systemMS.cpp.
References GlobalDelayExecStack, LOG_ERROR, rodsLog(), RuleExecInfo::rsComm, rsRuleExecDel(), ruleExecDelInp_t::ruleExecId, and SYS_INTERNAL_NULL_INPUT_ERR.
int recover_remoteExec | ( | msParam_t * | , |
msParam_t * | , | ||
char * | , | ||
ruleExecInfo_t * | rei | ||
) |
Definition at line 338 of file nre.systemMS.cpp.
References GlobalDelayExecStack, LOG_ERROR, RE_TEST_MACRO, rodsLog(), ruleExecDelInp_t::ruleExecId, and SYS_INTERNAL_NULL_INPUT_ERR.
int remoteExec | ( | msParam_t * | mPD, |
msParam_t * | mPA, | ||
msParam_t * | mPB, | ||
msParam_t * | mPC, | ||
ruleExecInfo_t * | rei | ||
) |
Definition at line 298 of file nre.systemMS.cpp.
References addKeyVal(), ExecMyRuleInp::addr, ALL_MS_PARAM_KW, carryOverMsParam(), clearMsParamArray(), ExecMyRuleInp::condInput, MsParam::inOutStruct, ExecMyRuleInp::inpParamArray, KeyValPair::len, LONG_NAME_LEN, META_STR_LEN, RuleExecInfo::msParamArray, ExecMyRuleInp::myRule, NULL, ExecMyRuleInp::outParamDesc, parseHostAddrStr(), replMsParamArray(), RuleExecInfo::rsComm, rsExecMyRule(), and rstrcpy().
Referenced by irods::lookup_table< resource_ptr >::lookup_table().
void set_plugin_instance_name | ( | const char * | _xml, |
char * | _plugin_name | ||
) |
Definition at line 138 of file nre.systemMS.cpp.
References terminate_irods_processes::e, getTaggedValues(), irods::log(), MAX_NAME_LEN, and rstrcpy().
Referenced by _delayExec().
|
static |
Definition at line 28 of file nre.systemMS.cpp.
Referenced by _delayExec(), recover_delayExec(), and recover_remoteExec().