Directory 6 Proxy and Virtual Data view transformations

Hello,

Could anyone guide me (or have an example) on how to correctly construct macro (substring(), split()) in view transformations:

dpconf add-virtual-transformation MYVIEW mapping attr-value-mapping dn internal-value:uid=\${uid} view-value:uid=\${uid},ou=.......

for example - I'd like to set (transform dn) a view value dn as uid=(uid from internal value), but ou=(as a substring of ou from internal value) ?

Any example would be helpful.

Thanks,

/Mareks

[504 byte] By [mareksa] at [2007-11-27 4:35:39]
# 1

The Reference manual has a couple of examples using the macros. <http://docs.sun.com/app/docs/doc/819-0997/6n3cs0bvg?a=view>

Split macro has a bug and does not work as expected with DPS 6 (bug 6495395).

Something like view-value:uid=\${uid},ou=substring(\${ou}, 0, 6),dc=example,dc=com would include the first 6 characters of the original OU in the DN's ou.

Ludo

ludovicpa at 2007-7-12 9:45:45 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2
Thank You !/Mareks
mareksa at 2007-7-12 9:45:45 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3

Hello again,

I'm still struggling with this - if I use this syntax:

view-value:uid=\${uid},ou=substring(\${ou}, 0, 6),dc=example,dc=com

first - I get "syntax error near unexpected token `('" which says that I need to escape ();

If I use then:

view-value:uid=\${uid},ou=substring\(\${ou}, 0, 6\),dc=example,dc=com

no transformation is done (simple ldapsearch) and if I use:

view-value:uid=\${uid},ou=substring\(\${ou}, 0, 6\)

ldapsearch returns uid=..., ou=substring(....... - so no macro processing.

What then would be correct way to escape macro command itself ?

Thanks,

Mareks

mareksa at 2007-7-12 9:45:45 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4

The value as stored in the Directory Proxy configuration file does not need any escaping.

The escaping (for the $ sign and parentheses) comes from the shell itself.

I don't think that the macro itself need escaping. But I will get confirmation by the responsible development engineer later this week.

Ludovic.

ludovicpa at 2007-7-12 9:45:45 > top of Java-index,Web & Directory Servers,Directory Servers...