2013/10/22 SB MK <[email protected]>
> Hi,
>
> I still don't manage to get what I need, but it looks so simple !
>
> I have to sync a few properties from "ref-ldap" to "dest-ldap", which is
> an embedded directory I can't manage. But fortunately, its "attr1"
> attribute (not a key attribute) matches the "uid" of my main repository, so
> I assume I can use it as a pivot too.
> "attr1' is not used to build the DN in "dest-ldap", these values are
> computed in a way I can't neither predict nor reproduce. But it shouldn't
> be a problem, as I'm not creating anything, should it ?
>
> Only records with matching "uid/attr1" values should (and can) be synced,
> so I followed your advice and set conditions preventing LSC from populating
> "dest-ldap".
>
> If I run LSC in dry run mode, it shows me what he plans to update but when
> I launch it for real, it doesn't find anything to sync (oct. 22 16:00:07 -
> INFO - All entries: 1, to modify entries: 0, successfully modified
> entries: 0, errors: 0)
>
> Of course, the credentials I use on "dest-ldap" allow me to
> read/update/create/delete, I checked this with an ldap editor.
>
> Can you help me find what's wrong with my parameters ?
>
> Regards
>
>
>
> <task>
> <name>MyTask</name>
> <bean>org.lsc.beans.SimpleBean</bean>
>
> <asyncLdapSourceService>
> <name>source-service</name>
> <connection reference="ref-ldap" />
> <baseDn>(not a </baseDn>
> <pivotAttributes>
> <string>uid</string>
> </pivotAttributes>
> <fetchedAttributes>
> <string>codecivilite</string>
> <string>cn</string>
> <string>mail</string>
> <string>givenName</string>
> <string>sn</string>
> <string>uid</string>
> <string>location</string>
> </fetchedAttributes>
>
> <getAllFilter>(&(objectClass=person))</getAllFilter>
>
> <getOneFilter>(&(objectClass=person)(uid={uid}))</getOneFilter>
> <serverType>OracleDS</serverType>
> </asyncLdapSourceService>
>
> <ldapDestinationService>
> <name>dst-service</name>
> <connection reference="dest-ldap"/>
> <baseDn>BASE_DN</baseDn>
> <pivotAttributes>
> <string>attr1</string>
> </pivotAttributes>
> <fetchedAttributes>
> <string>attr1</string>
> <string>localisationDesc</string>
> <string>displayName</string>
> <string>displayGn</string>
> <string>mail</string>
> <string>type</string>
> </fetchedAttributes>
>
> <getAllFilter>(&(objectClass=peopleRecord))</getAllFilter>
>
> <getOneFilter>(&(objectClass=peopleRecord)(attr1={attr1}))</getOneFilter>
> </ldapDestinationService>
>
> <propertiesBasedSyncOptions>
>
> <mainIdentifier>"nothing="+srcBean.getDatasetFirstValueById("uid")</mainIdentifier>
> <defaultDelimiter>;</defaultDelimiter>
> <defaultPolicy>FORCE</defaultPolicy>
>
> <conditions>
> <create>false</create>
> <update>true</update>
> <delete>false</delete>
> <changeId>false</changeId>
> </conditions>
>
> <dataset>
> <name>sn</name>
> <policy>FORCE</policy>
> <forceValues>
>
> <string>srcBean.getDatasetFirstValueById("uid")</string>
> </forceValues>
> </dataset>
>
> <dataset>
> <name>displayGn</name>
> <policy>FORCE</policy>
> <forceValues>
>
> <string>srcBean.getDatasetFirstValueById("givenName")</string>
> </forceValues>
> </dataset>
>
> <dataset>
> <name>displayName</name>
> <policy>FORCE</policy>
> <forceValues>
>
> <string>srcBean.getDatasetFirstValueById("sn")</string>
> </forceValues>
> </dataset>
>
> <dataset>
>
> <name>localisationDesc</name>
> <policy>FORCE</policy>
> <forceValues>
>
> <string>srcBean.getDatasetFirstValueById("location")</string>
> </forceValues>
> </dataset>
>
> <dataset>
> <name>mail</name>
> <policy>FORCE</policy>
> <forceValues>
>
> <string>srcBean.getDatasetFirstValueById("mail")</string>
> </forceValues>
> </dataset>
>
> <dataset>
> <name>type</name>
> <policy>FORCE</policy>
> <forceValues>
>
> <string>srcBean.getDatasetFirstValueById("codecivilite")</string>
> </forceValues>
> </dataset>
> </propertiesBasedSyncOptions>
> </task>
>
>
Try to replace:
<getOneFilter>(&(objectClass=peopleRecord)(attr1={attr1}))</getOneFilter>
by:
<getOneFilter>(&(objectClass=peopleRecord)(attr1={uid}))</getOneFilter>
Clément.
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users