Discussion:
[lsc-changes] [Ldap Synchronization...] page changed: documentation:plugins:howto_scripts
webmaster
2014-03-03 15:20:10 UTC
Permalink
A page in your DokuWiki was added or changed. Here are the details:

Date : 2014/03/03 16:20
Browser : Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
IP-Address : 88.173.78.196
Hostname : mne69-10-88-173-78-196.fbx.proxad.net
Old Revision: http://lsc-project.org/wiki/documentation/plugins/howto_scripts?rev=1393859370
New Revision: http://lsc-project.org/wiki/documentation/plugins/howto_scripts
Edit Summary:
User : coudot

@@ -20,5 +20,44 @@

* If 0 is returned, this means that the script has succeeded
* If a non zero exit code, this means that the script has failed.

+ ===== Variables =====

+ It is possible to pass variables to script by setting ''<exec:variables>'' parameters in lsc.xml.
+
+ They can then be read in the script as environment variables.
+
+ ===== Detailed API for each operation =====
+
+ ==== LIST ====
+
+ Nothing is given on STDIN by LSC. The script must send to STDOUT the list of entries under this format:
+
+ <file:ldif>
+ dn: entry1 identifier
+ pivot1: aaa
+
+ dn: entry2 identifier
+ pivot1: bbb
+
+ </file>
+
+ <note tip>You can define more than one pivot attributes.</note>
+
+ ==== GET ====
+
+ For each entry found, LSC call the GET script with all the pivot attributes and their values on STDIN, under this format:
+
+ <file:ldif>
+ pivot1: aaa
+ pivot2: xxx
+ </file>
+
+ The script must find the corresponding entry and return the full entry on STDOUT, under this format:
+
+ <file:ldif>
+ dn: entry identifier
+ attribute1: aaa
+ attribute2: abc
+ attribute3: def
+ </file>
--
This mail was generated by DokuWiki at
http://lsc-project.org/wiki/
webmaster
2014-03-03 16:01:38 UTC
Permalink
A page in your DokuWiki was added or changed. Here are the details:

Date : 2014/03/03 17:01
Browser : Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
IP-Address : 88.173.78.196
Hostname : mne69-10-88-173-78-196.fbx.proxad.net
Old Revision: http://lsc-project.org/wiki/documentation/plugins/howto_scripts?rev=1393860010
New Revision: http://lsc-project.org/wiki/documentation/plugins/howto_scripts
Edit Summary: removed
User : coudot

@@ -1,63 +1 @@
- ====== How to write scripts for Executable plugin ======

- ===== Script operations =====
-
- The Executable plugin runs a script for the following operations:
- * LIST: get all entries with their pivot attribute
- * GET: get one entry, identified by the pivot attribute, with all attributes
- * ADD: add one entry
- * UPDATE: modify one entry
- * REMOVE: delete one entry
- * RENAME: rename one entry
-
- ===== File handles =====
-
- * STDIN: receive messages from LSC, LDIF formatted
- * STDOUT: send messages to LSC, LDIF formatted
- * STDERR: send log messages to LSC. If log messages are prefixed with ''DEBUG: '', ''INFO: '', ''WARN: '' or ''ERROR: '', they will be written to the corresponding log level. If not specified, messages will be written to WARN level.
-
- ===== Return code =====
-
- * If 0 is returned, this means that the script has succeeded
- * If a non zero exit code, this means that the script has failed.
-
- ===== Variables =====
-
- It is possible to pass variables to script by setting ''<exec:variables>'' parameters in lsc.xml.
-
- They can then be read in the script as environment variables.
-
- ===== Detailed API for each operation =====
-
- ==== LIST ====
-
- Nothing is given on STDIN by LSC. The script must send to STDOUT the list of entries under this format:
-
- <file:ldif>
- dn: entry1 identifier
- pivot1: aaa
-
- dn: entry2 identifier
- pivot1: bbb
-
- </file>
-
- <note tip>You can define more than one pivot attributes.</note>
-
- ==== GET ====
-
- For each entry found, LSC call the GET script with all the pivot attributes and their values on STDIN, under this format:
-
- <file:ldif>
- pivot1: aaa
- pivot2: xxx
- </file>
-
- The script must find the corresponding entry and return the full entry on STDOUT, under this format:
-
- <file:ldif>
- dn: entry identifier
- attribute1: aaa
- attribute2: abc
- attribute3: def
- </file>
--
This mail was generated by DokuWiki at
http://lsc-project.org/wiki/
Loading...