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

irods_re_structs.cpp
Go to the documentation of this file.
1 #include "irods_re_structs.hpp"
2 #include "irods_re_plugin.hpp"
4 #include "rcMisc.h"
5 #include "packStruct.h"
6 #include "dataObjOpen.h"
7 #include "dataObjWrite.h"
8 #include "dataObjClose.h"
9 #include "dataObjLseek.h"
10 #include "fileLseek.h"
11 #include "ruleExecSubmit.h"
12 #include "rsDataObjOpen.hpp"
13 #include "rsDataObjLseek.hpp"
14 #include "rsDataObjWrite.hpp"
15 #include "rsDataObjClose.hpp"
16 
17 #include "irods_ms_plugin.hpp"
18 #include "irods_stacktrace.hpp"
19 #include "dstream.hpp"
20 
21 #define IRODS_FILESYSTEM_ENABLE_SERVER_SIDE_API
22 #include "filesystem.hpp"
23 
24 #define IRODS_IO_TRANSPORT_ENABLE_SERVER_SIDE_API
26 
27 #include <list>
28 
29 extern const packInstruct_t RodsPackTable[];
31 
32 // =-=-=-=-=-=-=-
33 // function to look up and / or load a microservice for execution
34 int actionTableLookUp( irods::ms_table_entry& _entry, char* _action ) {
35  irods::ms_table& MicrosTable = get_microservice_table();
36 
37  std::string str_act( _action );
38 
39  if ( str_act[0] == 'a' && str_act[1] == 'c' ) {
40  return -1;
41  }
42 
43  // =-=-=-=-=-=-=
44  // look up Action in microservice table. If it returns
45  // the end() iterator, is is not found so try to load it.
46  if ( !MicrosTable.has_entry( str_act ) ) {
47  rodsLog( LOG_DEBUG, "actionTableLookUp - [%s] not found, load it.", _action );
48  irods::error ret = irods::load_microservice_plugin( MicrosTable, str_act );
49  if ( !ret.ok() ) {
50  irods::log( PASS( ret ) );
51  return UNMATCHED_ACTION_ERR;
52  }
53  else { // if loaded
54  rodsLog( LOG_DEBUG, "actionTableLookUp - loaded [%s]", _action );
55  } // else
56  } // if not found
57 
58  _entry = *MicrosTable[ str_act ];
59 
60  return 0;
61 
62 } // actionTableLookUp
63 
64 int
65 applyRule( char *inAction, msParamArray_t *inMsParamArray, ruleExecInfo_t *rei, int reiSaveFlag ) {
66  // special case for libmso to work
67  //if(strchr(inAction, '(') != NULL) {
68  // return applyRule331(inAction, inMsParamArray, rei, reiSaveFlag);
69  //}
70  if (!RuleExistsHelper::Instance()->checkOperation(inAction)) {
71  return SUCCESS().code();
72  }
73 
74  (void) reiSaveFlag;
75  (void) inMsParamArray;
79  irods::AUDIT_RULE> re_ctx_mgr(
80  irods::re_plugin_globals->global_re_mgr,
81  rei);
82  irods::error err = re_ctx_mgr.exec_rule(inAction);
83  if(!err.ok()) {
84  rodsLog(
85  LOG_ERROR,
86  "applyRule: %d, %s",
87  err.code(),
88  err.result().c_str()
89  );
90  }
91  return err.code();
92 }
93 
94 int
95 applyRuleArg( const char *action, const char *args[MAX_NUM_OF_ARGS_IN_ACTION], int argc,
96  ruleExecInfo_t *rei, int reiSaveFlag ) {
97  if (!RuleExistsHelper::Instance()->checkOperation(action)) {
98  return SUCCESS().code();
99  }
100 
101  (void) reiSaveFlag;
103  irods::unit,
105  irods::AUDIT_RULE> re_ctx_mgr(
106  irods::re_plugin_globals->global_re_mgr,
107  rei);
108  std::list<boost::any> args2;
109  for(int i = 0; i<argc;i++) {
110  args2.push_back(boost::any(std::string(args[i])));
111  }
112  irods::error err = re_ctx_mgr.exec_rule(action, irods::unpack(args2));
113  if(!err.ok()) {
114  rodsLog(
115  LOG_ERROR,
116  "applyRuleArg: %d, %s",
117  err.code(),
118  err.result().c_str()
119  );
120  }
121  return err.code();
122 }
123 
125  const char* _action,
126  std::list<boost::any>& _params,
127  ruleExecInfo_t* _rei ) {
128  if (!RuleExistsHelper::Instance()->checkOperation(_action)) {
129  return SUCCESS().code();
130  }
131 
133  irods::unit,
135  irods::AUDIT_RULE> re_ctx_mgr(
136  irods::re_plugin_globals->global_re_mgr,
137  _rei);
138  irods::error err = re_ctx_mgr.exec_rule(_action, irods::unpack(_params));
139  if(!err.ok()) {
140  rodsLog(
141  LOG_ERROR,
142  "applyRuleWithOutVars: %d, %s",
143  err.code(),
144  err.result().c_str()
145  );
146  }
147  return err.code();
148 }
149 
150 void freeCmdExecOut( execCmdOut_t *ruleExecOut ) {
151  if ( ruleExecOut != NULL ) {
152  if ( ruleExecOut->stdoutBuf.buf != 0 ) {
153  free( ruleExecOut->stdoutBuf.buf );
154  }
155  if ( ruleExecOut->stderrBuf.buf != 0 ) {
156  free( ruleExecOut->stderrBuf.buf );
157  }
158  free( ruleExecOut );
159  }
160 
161 }
162 
163 int
165  dataObjInp_t *dataObjInp ) {
166  memset( rei, 0, sizeof( ruleExecInfo_t ) );
167  rei->doinp = dataObjInp;
168  rei->rsComm = rsComm;
169  if ( rsComm != NULL ) {
170  rei->uoic = &rsComm->clientUser;
171  rei->uoip = &rsComm->proxyUser;
172  }
173 
174  // also initialize condInputData for resource session variables
175  rei->condInputData = (keyValPair_t *)malloc(sizeof(keyValPair_t));
176  memset(rei->condInputData, 0, sizeof(keyValPair_t));
177 
178  return 0;
179 }
180 
181 int
183  collInp_t *collCreateInp, collInfo_t *collInfo ) {
184  int status;
185 
186  memset( rei, 0, sizeof( ruleExecInfo_t ) );
187  memset( collInfo, 0, sizeof( collInfo_t ) );
188  rei->coi = collInfo;
189  /* try to fill out as much info in collInfo as possible */
190  if ( ( status = splitPathByKey( collCreateInp->collName,
191  collInfo->collParentName, MAX_NAME_LEN, collInfo->collName, MAX_NAME_LEN, '/' ) ) < 0 ) {
193  "initReiWithCollInp: splitPathByKey for %s error, status = %d",
194  collCreateInp->collName, status );
195  return status;
196  }
197  else {
198  rstrcpy( collInfo->collName, collCreateInp->collName, MAX_NAME_LEN );
199  }
200  rei->rsComm = rsComm;
201  if ( rsComm != NULL ) {
202  rei->uoic = &rsComm->clientUser;
203  rei->uoip = &rsComm->proxyUser;
204  }
205 
206  return 0;
207 }
208 
209 namespace
210 {
211  int append_message_to_data_object(ruleExecInfo_t* _rei, const char* _path, char* _message)
212  {
213  if (!_rei || !_rei->rsComm) {
214  rodsLog(LOG_ERROR, "Rule execution info pointer or connection pointer is null");
216  }
217 
218  try {
221 
222  default_transport tp{*_rei->rsComm};
223  odstream out{tp, _path, std::ios_base::in | std::ios_base::ate};
224 
225  if (!out) {
226  rodsLog(LOG_ERROR, "Cannot open data object for writing [path => %s]", _path);
228  }
229 
230  out << _message;
231  }
232  catch (const std::exception& e) {
233  rodsLog(LOG_ERROR, e.what());
234  }
235 
236  return 0;
237  }
238 
239  void append_message_to_buffer(ruleExecInfo_t* _rei, const char* _target, char* _message)
240  {
241  execCmdOut_t* myExecCmdOut{};
242  msParamArray_t* inMsParamArray = _rei->msParamArray;
243  msParam_t* mP = getMsParamByLabel(inMsParamArray, "ruleExecOut");
244 
245  if (mP && mP->inOutStruct) {
246  if (strcmp(mP->type, STR_MS_T) == 0) {
247  myExecCmdOut = (execCmdOut_t*) malloc(sizeof(execCmdOut_t));
248  memset(myExecCmdOut, 0, sizeof(execCmdOut_t));
249  mP->inOutStruct = myExecCmdOut;
250  mP->type = strdup(ExecCmdOut_MS_T);
251  }
252  else {
253  myExecCmdOut = (execCmdOut_t*) mP->inOutStruct;
254  }
255  }
256  else {
257  myExecCmdOut = (execCmdOut_t*) malloc(sizeof(execCmdOut_t));
258  memset(myExecCmdOut, 0, sizeof(execCmdOut_t));
259 
260  if (!mP) {
261  addMsParam(inMsParamArray, "ruleExecOut", ExecCmdOut_MS_T, myExecCmdOut, nullptr);
262  }
263  else {
264  mP->inOutStruct = myExecCmdOut;
265  mP->type = strdup(ExecCmdOut_MS_T);
266  }
267  }
268 
269  if (strcmp(_target, "stdout") == 0) {
270  appendToByteBuf(&myExecCmdOut->stdoutBuf, _message);
271  }
272  else if (strcmp(_target, "stderr") == 0) {
273  appendToByteBuf(&myExecCmdOut->stderrBuf, _message);
274  }
275  }
276 } // anonymous namespace
277 
278 int _writeString( char *writeId, char *writeStr, ruleExecInfo_t *rei )
279 {
280  if (!writeId) {
281  rodsLog(LOG_ERROR, "Output target is null");
282  return 0;
283  }
284 
285  if (std::strcmp(writeId, "serverLog") == 0) {
286  rodsLog(LOG_NOTICE, "writeString: %s", writeStr);
287  return 0;
288  }
289 
290  if (!rei->rsComm) {
291  rodsLog(LOG_ERROR, "Connection object is null");
292  return 0;
293  }
294 
295  namespace fs = irods::experimental::filesystem::server;
296 
297  if (fs::is_data_object(*rei->rsComm, writeId)) {
298  return append_message_to_data_object(rei, writeId, writeStr);
299  }
300 
301  if (strcmp(writeId, "stdout") == 0 || strcmp(writeId, "stderr") == 0) {
302  append_message_to_buffer(rei, writeId, writeStr);
303  }
304  else {
305  rodsLog(LOG_ERROR, "Invalid output target [output target => %s]", writeId);
306  }
307 
308  return 0;
309 }
310 
311 int writeString( msParam_t* where, msParam_t* inString, ruleExecInfo_t *rei ) {
312  int i;
313  char *writeId;
314  char *writeStr;
315 
316  if ( where->inOutStruct == NULL ) {
317  writeId = where->label;
318  }
319  else {
320  writeId = ( char* )where->inOutStruct;
321  }
322 
323  if ( inString->inOutStruct == NULL ) {
324  writeStr = strdup( ( char * ) inString->label );
325  }
326  else {
327  writeStr = strdup( ( char * ) inString->inOutStruct );
328  }
329  i = _writeString( writeId, writeStr, rei );
330 
331  free( writeStr );
332  return i;
333 }
334 
335 int
337  int status = 0;
338 
339  if ( myRei == NULL || rsComm == NULL ) {
341  }
342 
343  if ( myRei->rsComm != NULL ) {
344  free( myRei->rsComm );
345  }
346 
347  myRei->rsComm = rsComm;
348  /* copy the clientUser. proxyUser is assumed to be in rsComm already */
349  rsComm->clientUser = *( myRei->uoic );
350 
351  if ( myRei->doi != NULL ) {
352  if ( myRei->doi->next != NULL ) {
353  free( myRei->doi->next );
354  myRei->doi->next = NULL;
355  }
356  }
357 
358  return status;
359 }
360 
361 int
363  bytesBuf_t *packedReiBBuf ) {
364  int status;
365 
366  if ( packedReiBBuf == NULL || rei == NULL ) {
368  }
369 
370  /* unpack the rei */
371 
372  /* alway use NATIVE_PROT for rei */
373  status = unpackStruct( packedReiBBuf->buf, ( void ** ) rei,
374  "Rei_PI", RodsPackTable, NATIVE_PROT );
375 
376  if ( status < 0 ) {
378  "unpackRei: unpackStruct error. status = %d", status );
379  return status;
380  }
381 
382  /* try to touch up the unpacked rei */
383 
384  status = touchupPackedRei( rsComm, *rei );
385 
386  return status;
387 }
388 
389 int
390 packReiAndArg( ruleExecInfo_t *rei, char *myArgv[],
391  int myArgc, bytesBuf_t **packedReiAndArgBBuf ) {
392 
393  if (!rei) {
395  "packReiAndArg: NULL rei input" );
397  }
398 
399  if ( !packedReiAndArgBBuf ) {
401  "packReiAndArg: NULL packedReiAndArgBBuf input" );
403  }
404 
405  if ( myArgc > 0 && ( myArgv == NULL || *myArgv == NULL ) ) {
407  "packReiAndArg: NULL myArgv input" );
409  }
410 
411  ruleExecInfoAndArg_t reiAndArg{
412  .rei=rei,
413  .reArg={
414  .myArgc=myArgc,
415  .myArgv=myArgv
416  }
417  };
418 
419  /* pack the reiAndArg */
420 
421  int status = packStruct( ( void * ) &reiAndArg, packedReiAndArgBBuf,
422  "ReiAndArg_PI", RodsPackTable, 0, NATIVE_PROT );
423 
424  if ( status < 0 ) {
426  "packReiAndArg: packStruct error. status = %d", status );
427  return status;
428  }
429 
430  return status;
431 }
432 
433 int
435  bytesBuf_t *packedReiAndArgBBuf ) {
436  int status;
437  /*ruleExecInfo_t *myRei;*/
438 
439  if ( packedReiAndArgBBuf == NULL || reiAndArg == NULL ) {
441  }
442 
443  /* unpack the reiAndArg */
444 
445  status = unpackStruct( packedReiAndArgBBuf->buf, ( void ** ) reiAndArg,
446  "ReiAndArg_PI", RodsPackTable, NATIVE_PROT );
447 
448  if ( status < 0 ) {
450  "unpackReiAndArg: unpackStruct error. status = %d", status );
451  return status;
452  }
453 
454  /* try to touch up the unpacked rei */
455 
456  status = touchupPackedRei( rsComm, ( *reiAndArg )->rei );
457 
458  return status;
459 }
460 
461 std::map<std::string, std::vector<std::string>>
462 getTaggedValues(const char *str) {
463  std::map<std::string, std::vector<std::string>> ret_map{};
464  if (!str) {
465  return ret_map;
466  }
467  std::vector<std::tuple<std::string, const char*>> tag_stack;
468  while ((str = strchr(str, '<'))) {
469  const char * tag_end = strchr(str, '>');
470  if (str[1] == '/') {
471  std::string& last_tag = std::get<0>(tag_stack.back());
472  if ( last_tag.size() != static_cast<std::size_t>(tag_end - str - 2) || strncmp(last_tag.c_str(), str + 2, last_tag.size()) != 0 ) {
473  THROW( INPUT_ARG_NOT_WELL_FORMED_ERR, boost::format("unterminated tag: [%s]") % last_tag);
474  }
475  ret_map[last_tag].emplace_back(std::get<1>(tag_stack.back()), str);
476  tag_stack.pop_back();
477  } else {
478  tag_stack.emplace_back(std::string{str + 1, tag_end}, tag_end + 1);
479  }
480  str = tag_end;
481  }
482  if ( !tag_stack.empty() ) {
483  std::string& last_tag = std::get<0>(tag_stack.back());
484  THROW( INPUT_ARG_NOT_WELL_FORMED_ERR, boost::format("unterminated tag: [%s]") % last_tag);
485  }
486  return ret_map;
487 }
488 
489 int
490 fillSubmitConditions( const char *action, const char *inDelayCondition,
491  bytesBuf_t *packedReiAndArgBBuf, ruleExecSubmitInp_t *ruleSubmitInfo,
492  ruleExecInfo_t *rei ) {
493 
494  snprintf( ruleSubmitInfo->ruleName, sizeof( ruleSubmitInfo->ruleName ), "%s", action );
495 
496  boost::optional<std::map<std::string, std::vector<std::string>>> taggedValues;
497  try {
498  taggedValues = getTaggedValues(inDelayCondition);
499  } catch ( const irods::exception& e) {
501  return e.code();
502  }
503 
504  auto it = taggedValues->find("INST_NAME");
505  if ( it != taggedValues->end() ) {
506  addKeyVal( &ruleSubmitInfo->condInput, INSTANCE_NAME_KW, it->second.front().c_str() );
507  taggedValues->erase(it);
508  }
509 
510  it = taggedValues->find("EA");
511  if ( it != taggedValues->end() ) {
512  strncpy(ruleSubmitInfo->exeAddress, it->second.front().c_str(), NAME_LEN);
513  taggedValues->erase(it);
514  }
515 
516  it = taggedValues->find("ET");
517  if ( it != taggedValues->end() ) {
518  strncpy(ruleSubmitInfo->exeTime, it->second.front().c_str(), TIME_LEN);
519  if ( int i = checkDateFormat( ruleSubmitInfo->exeTime ) ) {
520  return i;
521  }
522  taggedValues->erase(it);
523  }
524 
525  it = taggedValues->find("EF");
526  if ( it != taggedValues->end() ) {
527  strncpy(ruleSubmitInfo->exeFrequency, it->second.front().c_str(), NAME_LEN);
528  taggedValues->erase(it);
529  }
530 
531  it = taggedValues->find("PRI");
532  if ( it != taggedValues->end() ) {
533  strncpy(ruleSubmitInfo->priority, it->second.front().c_str(), NAME_LEN);
534  taggedValues->erase(it);
535  }
536 
537  it = taggedValues->find("EET");
538  if ( it != taggedValues->end() ) {
539  strncpy(ruleSubmitInfo->estimateExeTime, it->second.front().c_str(), NAME_LEN);
540  taggedValues->erase(it);
541  }
542 
543  it = taggedValues->find("NA");
544  if ( it != taggedValues->end() ) {
545  strncpy(ruleSubmitInfo->notificationAddr, it->second.front().c_str(), NAME_LEN);
546  taggedValues->erase(it);
547  }
548 
549  it = taggedValues->find("PLUSET");
550  if ( it != taggedValues->end() ) {
551  getOffsetTimeStr( ruleSubmitInfo->exeTime, it->second.front().c_str() );
552  if ( int i = checkDateFormat( ruleSubmitInfo->exeTime ) ) {
553  return i;
554  }
555  taggedValues->erase(it);
556  }
557 
558  it = taggedValues->find("KVALPR");
559  std::size_t i = 0;
560  if ( it != taggedValues->end() ) {
561  for ( const auto& kvp : it->second ) {
562  std::size_t equals_index = kvp.find('=');
563  if ( equals_index == std::string::npos ) {
565  }
566 
567  std::size_t end_key_index = equals_index;
568  do {
569  if ( end_key_index == 0 ) {
571  }
572  } while ( kvp[--end_key_index] == ' ' );
573  ruleSubmitInfo->condInput.keyWord[i] = strndup( kvp.c_str(), end_key_index + 1 );
574 
575  std::size_t start_val_index = equals_index;
576  do {
577  if ( start_val_index == kvp.size() - 1 ) {
579  }
580  } while ( kvp[++start_val_index] == ' ' );
581 
582  ruleSubmitInfo->condInput.value[i] = strdup(kvp.c_str() + start_val_index);
583  ++i;
584  }
585  }
586 
587  ruleSubmitInfo->condInput.len = i;
588  ruleSubmitInfo->packedReiAndArgBBuf = packedReiAndArgBBuf;
589  if ( strlen( ruleSubmitInfo->userName ) == 0 ) {
590  if ( strlen( rei->uoic->userName ) != 0 ) {
591  snprintf( ruleSubmitInfo->userName, sizeof( ruleSubmitInfo->userName ),
592  "%s", rei->uoic->userName );
593  }
594  else if ( strlen( rei->rsComm->clientUser.userName ) != 0 ) {
595  snprintf( rei->rsComm->clientUser.userName, sizeof( rei->rsComm->clientUser.userName ),
596  "%s", rei->uoic->userName );
597  }
598  }
599  return 0;
600 }
ruleExecSubmitInp_t::packedReiAndArgBBuf
bytesBuf_t * packedReiAndArgBBuf
Definition: ruleExecSubmit.h:34
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
RuleExecInfoAndArg::rei
ruleExecInfo_t * rei
Definition: irods_re_structs.hpp:47
NULL
#define NULL
Definition: rodsDef.h:70
irods::unit
std::tuple<> unit
Definition: irods_re_plugin.hpp:736
rsComm_t
Definition: rcConnect.h:145
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
SYS_INTERNAL_NULL_INPUT_ERR
@ SYS_INTERNAL_NULL_INPUT_ERR
Definition: rodsErrorTable.h:92
irods::lookup_table
Definition: irods_lookup_table.hpp:24
get_microservice_table
irods::ms_table & get_microservice_table()
Definition: reAction.cpp:5
irods_ms_plugin.hpp
RuleExistsHelper::Instance
static RuleExistsHelper * Instance()
Definition: irods_re_ruleexistshelper.cpp:6
THROW
#define THROW(_code, _msg)
Definition: irods_exception.hpp:68
getMsParamByLabel
msParam_t * getMsParamByLabel(msParamArray_t *msParamArray, const char *label)
Definition: msParam.cpp:376
rsDataObjWrite.hpp
CollInp
Definition: dataObjInpOut.h:157
BytesBuf::buf
void * buf
Definition: rodsDef.h:199
ExecCmdOut
Definition: execCmd.h:20
writeString
int writeString(msParam_t *where, msParam_t *inString, ruleExecInfo_t *rei)
Definition: irods_re_structs.cpp:311
ruleExecSubmitInp_t::estimateExeTime
char estimateExeTime[64]
Definition: ruleExecSubmit.h:31
rsDataObjOpen.hpp
packInstruct_t
Definition: packStruct.h:31
INSTANCE_NAME_KW
#define INSTANCE_NAME_KW
Definition: rodsKeyWdDef.h:287
irods::experimental::filesystem::client::is_data_object
auto is_data_object(object_status _s) noexcept -> bool
Definition: filesystem.cpp:635
userInfo_t::userName
char userName[64]
Definition: rodsUser.h:66
irods::rule_engine_context_manager
Definition: irods_re_plugin.hpp:522
getTaggedValues
std::map< std::string, std::vector< std::string > > getTaggedValues(const char *str)
Definition: irods_re_structs.cpp:462
actionTableLookUp
int actionTableLookUp(irods::ms_table_entry &_entry, char *_action)
Definition: irods_re_structs.cpp:34
irods_stacktrace.hpp
PASS
#define PASS(prev_error_)
Definition: irods_error.hpp:118
packReiAndArg
int packReiAndArg(ruleExecInfo_t *rei, char *myArgv[], int myArgc, bytesBuf_t **packedReiAndArgBBuf)
Definition: irods_re_structs.cpp:390
applyRule
int applyRule(char *inAction, msParamArray_t *inMsParamArray, ruleExecInfo_t *rei, int reiSaveFlag)
Definition: irods_re_structs.cpp:65
RuleExecInfo::coi
collInfo_t * coi
Definition: irods_re_structs.hpp:32
ruleExecSubmitInp_t::priority
char priority[64]
Definition: ruleExecSubmit.h:28
irods::unpack
Definition: irods_re_plugin.hpp:66
rcMisc.h
RodsPackTable
const packInstruct_t RodsPackTable[]
Definition: rodsPackTable.h:61
USER_FILE_DOES_NOT_EXIST
@ USER_FILE_DOES_NOT_EXIST
Definition: rodsErrorTable.h:241
irods::experimental::io::client::default_transport
basic_transport< char > default_transport
Definition: default_transport.hpp:299
filesystem.hpp
dataObjLseek.h
RuleExecInfo::doi
dataObjInfo_t * doi
Definition: irods_re_structs.hpp:28
unpackStruct
int unpackStruct(const void *inPackStr, void **outStruct, const char *packInstName, const packInstruct_t *myPackTable, irodsProt_t irodsProt)
Definition: packStruct.cpp:63
RuleExecInfo::doinp
dataObjInp_t * doinp
Definition: irods_re_structs.hpp:27
irods_re_ruleexistshelper.hpp
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
initReiWithCollInp
int initReiWithCollInp(ruleExecInfo_t *rei, rsComm_t *rsComm, collInp_t *collCreateInp, collInfo_t *collInfo)
Definition: irods_re_structs.cpp:182
run_tests.action
action
Definition: run_tests.py:114
freeCmdExecOut
void freeCmdExecOut(execCmdOut_t *ruleExecOut)
Definition: irods_re_structs.cpp:150
fileLseek.h
MsParam::type
char * type
Definition: msParam.h:78
CollInfo
Definition: objInfo.h:177
DataObjInfo::next
struct DataObjInfo * next
Definition: objInfo.h:163
checkDateFormat
int checkDateFormat(char *s)
Definition: rcMisc.cpp:2129
STR_MS_T
#define STR_MS_T
Definition: msParam.h:21
irods_re_plugin.hpp
RuleExecInfo::rsComm
rsComm_t * rsComm
Definition: irods_re_structs.hpp:22
touchupPackedRei
int touchupPackedRei(rsComm_t *rsComm, ruleExecInfo_t *myRei)
Definition: irods_re_structs.cpp:336
KeyValPair::value
char ** value
Definition: objInfo.h:123
ruleExecSubmitInp_t::condInput
keyValPair_t condInput
Definition: ruleExecSubmit.h:33
SUCCESS
#define SUCCESS()
Definition: irods_error.hpp:121
RuleExecInfo::condInputData
keyValPair_t * condInputData
Definition: irods_re_structs.hpp:34
irods::error::code
long long code() const
Definition: irods_error.cpp:194
ExecCmdOut_MS_T
#define ExecCmdOut_MS_T
Definition: msParam.h:41
RuleExecInfo::uoip
userInfo_t * uoip
Definition: irods_re_structs.hpp:31
LOG_DEBUG
#define LOG_DEBUG
Definition: rodsLog.h:23
rsComm_t::proxyUser
userInfo_t proxyUser
Definition: rcConnect.h:152
ruleExecSubmit.h
TIME_LEN
#define TIME_LEN
Definition: rodsDef.h:54
default_transport.hpp
ExecCmdOut::stdoutBuf
bytesBuf_t stdoutBuf
Definition: execCmd.h:21
appendToByteBuf
int appendToByteBuf(bytesBuf_t *bytesBuf, char *str)
Definition: rcMisc.cpp:3048
UNMATCHED_ACTION_ERR
@ UNMATCHED_ACTION_ERR
Definition: rodsErrorTable.h:595
KeyValPair::keyWord
char ** keyWord
Definition: objInfo.h:122
DataObjInp
Definition: dataObjInpOut.h:65
rsDataObjClose.hpp
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
MAX_NUM_OF_ARGS_IN_ACTION
#define MAX_NUM_OF_ARGS_IN_ACTION
Definition: irods_re_structs.hpp:13
initReiWithDataObjInp
int initReiWithDataObjInp(ruleExecInfo_t *rei, rsComm_t *rsComm, dataObjInp_t *dataObjInp)
Definition: irods_re_structs.cpp:164
getOffsetTimeStr
void getOffsetTimeStr(char *timeStr, const char *offSet)
Definition: rcMisc.cpp:1659
irods::AUDIT_RULE
@ AUDIT_RULE
Definition: irods_re_plugin.hpp:124
irods::experimental::io::odstream
basic_dstream< std::basic_ostream< char > > odstream
Definition: dstream.hpp:539
irods::lookup_table::has_entry
bool has_entry(KeyType _k) const
Definition: irods_lookup_table.hpp:41
fillSubmitConditions
int fillSubmitConditions(const char *action, const char *inDelayCondition, bytesBuf_t *packedReiAndArgBBuf, ruleExecSubmitInp_t *ruleSubmitInfo, ruleExecInfo_t *rei)
Definition: irods_re_structs.cpp:490
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
dataObjWrite.h
MsParam
Definition: msParam.h:76
RuleExecInfoAndArg
Definition: irods_re_structs.hpp:46
splitPathByKey
int splitPathByKey(const char *srcPath, char *dir, size_t maxDirLen, char *file, size_t maxFileLen, char key)
Definition: stringOpr.cpp:222
packStruct.h
irods::log
void log(const error &)
Definition: irods_log.cpp:13
INPUT_ARG_NOT_WELL_FORMED_ERR
@ INPUT_ARG_NOT_WELL_FORMED_ERR
Definition: rodsErrorTable.h:658
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
rsComm_t::clientUser
userInfo_t clientUser
Definition: rcConnect.h:153
dataObjClose.h
BytesBuf
Definition: rodsDef.h:197
irods::error
Definition: irods_error.hpp:23
irods::ms_table_entry
Definition: irods_ms_plugin.hpp:28
ruleExecSubmitInp_t
Definition: ruleExecSubmit.h:21
MsParam::label
char * label
Definition: msParam.h:77
CollInfo::collParentName
char collParentName[(1024+64)]
Definition: objInfo.h:180
unpackRei
int unpackRei(rsComm_t *rsComm, ruleExecInfo_t **rei, bytesBuf_t *packedReiBBuf)
Definition: irods_re_structs.cpp:362
RuleExecInfo::uoic
userInfo_t * uoic
Definition: irods_re_structs.hpp:30
RuleExecInfo::msParamArray
msParamArray_t * msParamArray
Definition: irods_re_structs.hpp:24
rsDataObjLseek.hpp
_writeString
int _writeString(char *writeId, char *writeStr, ruleExecInfo_t *rei)
Definition: irods_re_structs.cpp:278
RuleExecInfo
Definition: irods_re_structs.hpp:18
irods_re_structs.hpp
KeyValPair::len
int len
Definition: objInfo.h:121
unpackReiAndArg
int unpackReiAndArg(rsComm_t *rsComm, ruleExecInfoAndArg_t **reiAndArg, bytesBuf_t *packedReiAndArgBBuf)
Definition: irods_re_structs.cpp:434
packStruct
int packStruct(const void *inStruct, bytesBuf_t **packedResult, const char *packInstName, const packInstruct_t *myPackTable, int packFlag, irodsProt_t irodsProt)
Definition: packStruct.cpp:21
irods::exception
Definition: irods_exception.hpp:15
ruleExecSubmitInp_t::exeAddress
char exeAddress[64]
Definition: ruleExecSubmit.h:25
CollInp::collName
char collName[(1024+64)]
Definition: dataObjInpOut.h:158
NATIVE_PROT
@ NATIVE_PROT
Definition: rodsDef.h:148
dataObjOpen.h
applyRuleArg
int applyRuleArg(const char *action, const char *args[20], int argc, ruleExecInfo_t *rei, int reiSaveFlag)
Definition: irods_re_structs.cpp:95
ruleExecSubmitInp_t::exeTime
char exeTime[32]
Definition: ruleExecSubmit.h:26
applyRuleWithInOutVars
int applyRuleWithInOutVars(const char *_action, std::list< boost::any > &_params, ruleExecInfo_t *_rei)
Definition: irods_re_structs.cpp:124
MsParam::inOutStruct
void * inOutStruct
Definition: msParam.h:80
addMsParam
int addMsParam(msParamArray_t *msParamArray, const char *label, const char *packInstruct, void *inOutStruct, bytesBuf_t *inpOutBuf)
Definition: msParam.cpp:17
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
ruleExecSubmitInp_t::notificationAddr
char notificationAddr[64]
Definition: ruleExecSubmit.h:32
MsParamArray
Definition: msParam.h:84
ruleExecSubmitInp_t::userName
char userName[64]
Definition: ruleExecSubmit.h:24
NAME_LEN
#define NAME_LEN
Definition: rodsDef.h:55
KeyValPair
Definition: objInfo.h:120
dstream.hpp
irods::error::ok
bool ok()
Definition: irods_error.cpp:258
manual_cleanup.out
out
Definition: manual_cleanup.py:29
CollInfo::collName
char collName[(1024+64)]
Definition: objInfo.h:179
ruleExecSubmitInp_t::ruleName
char ruleName[(1024 *20)]
Definition: ruleExecSubmit.h:22
irods::error::result
std::string result() const
Definition: irods_error.cpp:201
irods::re_plugin_globals
std::unique_ptr< struct irods::global_re_plugin_mgr > re_plugin_globals
Definition: irods_re_plugin.cpp:16
ExecCmdOut::stderrBuf
bytesBuf_t stderrBuf
Definition: execCmd.h:22
ruleExecSubmitInp_t::exeFrequency
char exeFrequency[64]
Definition: ruleExecSubmit.h:27
irods::load_microservice_plugin
error load_microservice_plugin(ms_table &_table, const std::string _ms)
Definition: irods_ms_plugin.cpp:242