Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python rule engine support + other plugin rule engines #259

Closed
michael-conway opened this issue Sep 27, 2017 · 4 comments
Closed

python rule engine support + other plugin rule engines #259

michael-conway opened this issue Sep 27, 2017 · 4 comments
Assignees

Comments

@michael-conway
Copy link
Collaborator

per RE: [iROD-Chat:16899] rule engine weirdness when Python engaged

Add a rule engine instance flag to the exec rule code

You need to specify the rule engine instance which handles the irule invocation. Since python is first it will try to service the native rule language irule request, assuming you did not specify the native rule engine instance which I presume is second in the json array.

https://docs.irods.org/4.2.1/icommands/user/#irule
--rule-engine-plugin-instance,-r - run rule on the specified rule engine instance

@michael-conway
Copy link
Collaborator Author

michael-conway commented Oct 2, 2017

review...


Failed tests:
  DataObjectAOImplTest.testSetReadAsAdmin:2986 null
  DataObjectAOImplTest.testSetWriteAsAdmin:3027 null
  DataObjectAOImplTest.testSetAccessPermissionRead:3421 null
  DataObjectAOImplTest.testSetAccessPermissionWrite:3454 secondary user cannot write file

Tests in error:
  DataObjectAOImplTest.testGetPermissionsOwn:3284 ▒ FileNotFound File not found
  EncryptionWrapperFactoryTest.testGetAesEncryptFromFactory:27 ▒ JargonRuntime c...
  AesCipherEncryptWrapperTest.testEncryptAes:51 ▒ JargonRuntime cannot generate ...

Tests run: 1515, Failures: 4, Errors: 3, Skipped: 0


@michael-conway
Copy link
Collaborator Author

example python user submitted rules

@michael-conway michael-conway changed the title add enum to indicate rule executing on chosen rule engine python rule engine support + other plugin rule engines Oct 2, 2017
@michael-conway
Copy link
Collaborator Author

example user submitted python rule

https://irods.org/2016/07/writing-rules-for-the-python-rule-engine/

@michael-conway
Copy link
Collaborator Author

key iRODS code points

irule.cpp

  /* add key val for specifying instance on which to run rule */
    if ( argsMap.count( "rule-engine-plugin-instance" ) ) {
        addKeyVal( &execMyRuleInp.condInput, irods::CFG_INSTANCE_NAME_KW.c_str(), argsMap["rule-engine-plugin-instance"].as<std::string>().c_str() );
    }

const std::string CFG_INSTANCE_NAME_KW("instance_name");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant