Hello,

I have created a loopback driver in order to create an user or
workstation object besides of some other tasks.

However, I would like to enhance the driver to check if the object
already exist in advance and only create it if its not already there.
Otherwise i experience an "createEntry -606 ERR_ENTRY_ALREADY_EXISTS"
error.

This is my rule:

Set local variable "target object DN"


Code:
--------------------
<do-set-local-variable name="lvTargetObject">
<arg-string>
<token-parse-dn dest-dn-format="qualified-slash" src-dn-format="ldap">
<token-src-attr name="myObjectDN"/>
</token-parse-dn>
</arg-string>
</do-set-local-variable>
--------------------



Object will be created (i only want this if the object is not already
there, how can i achieve that?)


Code:
--------------------

<do-if>
<arg-conditions>
<and>
<if-local-variable mode="regex" name="myObjectDN" op="equal">.+</if-local-variable>
</and>
</arg-conditions>
<arg-actions>
<do-add-src-object class-name="Workstation">
<arg-dn>
<token-local-variable name="myObjectDN"/>
</arg-dn>
</do-add-src-object>
<do-add-src-attr-value name="Object Class">
<arg-dn>
<token-local-variable name="myObjectDN"/>
</arg-dn>
<arg-value type="string">
<token-text xml:space="preserve">myObjectExtension</token-text>
</arg-value>
</do-add-src-attr-value>
</arg-actions>
</do-if>

--------------------


Any help would be appreciated!

Thank You
Alex


--
Cardinal62
------------------------------------------------------------------------
Cardinal62's Profile: https://forums.netiq.com/member.php?userid=4902
View this thread: https://forums.netiq.com/showthread.php?t=53061