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>(&amp;(objectClass=person))</getAllFilter>

<getOneFilter>(&amp;(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>(&amp;(objectClass=peopleRecord))</getAllFilter>

<getOneFilter>(&amp;(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>


2013/10/4 SB MK <[email protected]>

> Thanks.
> And that means it will not create anything at all, or add the missing
> properties if needed, without populating the dest directory with new
> records ?
> I have a central repository with thousands entires, and I just want to
> update fields on the "same items" (same uid) in another directory, much
> smaller, according to the main repo values.
> I've already tried to set all conditions except update to 'false' and ran
> it for real, but LSC tells me there is nothing to update. If I test with
> dry run, it shows me a 1-1 replication, with the correct values (but too
> many records).
> Regards
>
> 2013/10/4 SB MK <[email protected]>
>>
>
>>  Hi,
>>
>> How can I configure LSC so that only already existing entries in
>> destination directory (say same uid) are updated, but missing elements are
>> not created ?
>>
>>
>>
>> Just set the "create" condition to false. See
>> http://lsc-project.org/wiki/documentation/2.0/configuration/syncoptions#conditions_lsc_tasks_task_propertiesbasedsyncoptions_conditions
>>
>>
>
>
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to