It works as expected in rc2.   Interestingly,  the trunk code worked fine
for OU creation with this config.   I can't figure out the difference.

  <tasks>
      <task>
      <name>SyncTask-OUs</name>
      <bean>org.lsc.beans.SimpleBean</bean>
      <ldapSourceService>
        <name>SyncTask-OUs-src</name>
        <connection reference="src-ldap"/>
        <baseDn>dc=xyz,dc=net</baseDn>
        <pivotAttributes>
          <string>distinguishedName</string>
        </pivotAttributes>
        <fetchedAttributes>
          <string>description</string>
          <string>ou</string>
        </fetchedAttributes>

<getAllFilter>(&amp;(!(isCriticalSystemObject=TRUE))(objectClass=organizationalUnit))</getAllFilter>

<getOneFilter>(&amp;(objectClass=organizationalUnit)(distinguishedName={distinguishedName}))</getOneFilter>
<!--

<cleanFilter>(&amp;(!(isCriticalSystemObject=TRUE))(objectClass=organizationalUnit)(distinguishedName={description}))</cleanFilter>
-->
      </ldapSourceService>
      <ldapDestinationService>
        <name>SyncTask-OUs-dst</name>
        <connection reference="dst-ldap"/>
        <baseDn>dc=montpelierre,dc=qa1</baseDn>
        <pivotAttributes>
          <string>description</string>
        </pivotAttributes>
        <fetchedAttributes>
           <string>description</string>
          <string>objectClass</string>
          <string>ou</string>
        </fetchedAttributes>

<getAllFilter>(&amp;(!(isCriticalSystemObject=TRUE))(objectClass=organizationalUnit))</getAllFilter>

<getOneFilter>(&amp;(!(isCriticalSystemObject=TRUE))(objectClass=organizationalUnit)(description={distinguishedName}))</getOneFilter>
      </ldapDestinationService>
      <propertiesBasedSyncOptions>
        <mainIdentifier>
        <![CDATA[
            var pattern = "(?i)dc=xyz,dc=net" ;
            var substitute = "dc=xyz,dc=qa1";
            var dn=srcBean.getMainIdentifier();
            dn = dn.replaceAll(pattern,substitute);
            dn;  // "emit" the result
        ]]>
        </mainIdentifier>
        <defaultDelimiter>;</defaultDelimiter>
        <defaultPolicy>KEEP</defaultPolicy> <!-- if a rule isn't specified
above, leave the object as-is -->
        <dataset>
          <name>objectClass</name>
          <policy>FORCE</policy>
          <forceValues>
            <string>"organizationalUnit"</string>
            <string>"top"</string>
          </forceValues>
          <delimiter>,</delimiter>
        </dataset>
        <dataset>
         <name>name</name>
          <policy>FORCE</policy>
          <forceValues>
            <string>js:srcBean.getDatasetFirstValueById("ou")</string>
          </forceValues>
        </dataset>
        <dataset>
          <name>description</name>
          <policy>FORCE</policy>
          <forceValues>
             <string>srcBean.getMainIdentifier()</string>
          </forceValues>
        </dataset>
      </propertiesBasedSyncOptions>
    </task>


On Wed, May 16, 2012 at 9:52 AM, Hugh Kelley <[email protected]> wrote:

> Yes, I'm happy to test other versions.  A similar configuration had been
> working for me with branch code so perhaps that's the place to start.  I'd
> prefer not to go back to rc2 since my configuration depends on the changes
> made in issue 466 <http://tools.lsc-project.org/issues/466> and my
> lsc.xml filters have been updated to <cleanFilter>, but I can probably work
> around those.
>
> Hugh
>
>
> On Wed, May 16, 2012 at 9:45 AM, Clément OUDOT <[email protected]>wrote:
>
>> 2012/5/16 Hugh Kelley <[email protected]>:
>> > I am using yesterday's trunk snapshot from
>> > http://tools.lsc-project.org/projects/list_files/lsc.
>> >
>> > I'm putting Wireshark on the server right now to confirm that the
>> attributes
>> > are coming back from the source, though ldifde.exe worked fine.
>> >
>>
>> Could do a quick test with the latest 2.0 code, or 2.0rc2 ? Just to
>> confirm this can be a bug in the trunk.
>>
>> As a workaround, you still can define a dataset per attribute to
>> synchronize.
>>
>> Clément.
>>
>
>
_______________________________________________________________
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