You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the second parameter of the remote execution microservice, we can
now use INST_NAME to specify which rule engine plugin instance on
the remote host should be used to execute the given rule text.
Copy file name to clipboardExpand all lines: README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,13 +58,22 @@ This version of the Python Rule Engine Plugin uses the Python 2.7 interpreter.
58
58
59
59
# Remote Execution
60
60
61
-
There exists a requirement for the implementation of a different ```remote``` microservice call for every rule language. Given the possibility of a namespace collision with more than one rule language being configured simultaneously, the name of the microservice to use for the python language is ```py_remote()```.
61
+
There exists a requirement for the implementation of a different `remote` microservice call for every rule language. Given the possibility of a namespace collision with more than one rule language being configured simultaneously, the name of the microservice to use for the python language is `py_remote()`. As with remote execution via the native rule engine, this microservice runs the given rule text on the remote host using `exec_rule_text`. This can be done on any iRODS host (inside or outside the local zone) where the invoking user is authenticated.
62
+
63
+
The microservice's signature is: `py_remote(hostname, hints, code, recovery)`.
64
+
65
+
Its four parameters are strings:
66
+
-`hostname`. The name of the iRODS server where the code is to be executed.
67
+
-`hints`. A string containing optional XML tags. Currently scanned only for the `INST_NAME` tag, and other tags - if used - will be ignored. This
68
+
includes <ZONE>, since the zone (whether remote or local) is inferred from the `hostname` parameter.
69
+
-`code`. The Python source code to be executed, in the form of a complete rule, i.e.: `def main(rule_args,callback,rei): ...`
70
+
-`recovery`. This is currently unused.
62
71
63
72
For example:
64
73
```
65
74
def main(rule_args, callback, rei):
66
75
rule_code = "def main(rule_args, callback, rei):\n print('This is a test of the Python Remote Rule Execution')"
0 commit comments