|
| parsing a mapping table |
 |
Thu, 08 May 2008 00:36:01 GMT |
HI
I'm trying to parse a mapping table to force to utilise a value from
it. I'd like to do this to stop querying the directory every time to
buld the node.
I am able to retrieve the data and do a for loop, but i'm stuck with
how to pull the values out of the resulting nodeset.
The code below seems to setup the nodeset and decode it, but its in the
format of
<row>
<col>TSC</col>
<col>\TSC\TSC-USERS</col>
</row>
I only need to utilise the second column information.
<do-set-local-variable name="var_mytable1"
scope="policy">
<arg-node-set>
<token-xml-parse>
<token-base64-decode>
<token-src-attr name="DirXML-Data">
<arg-dn>
<token-text>X\Library\eDir Placement Table
Table</token-text>
</arg-dn>
</token-src-attr>
</token-base64-decode>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="var_mytable1"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="var_test"
scope="policy">
<arg-string>
<token-local-variable name="current-node"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
--
cfiegert
------------------------------------------------------------------------
cfiegert's Profile: http://forums.novell.com/member.php?userid=9337
View this thread: http://forums.novell.com/showthread.php?t=327074
|
| Post Reply
|
| Re: parsing a mapping table |
 |
Thu, 08 May 2008 00:51:02 GMT |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This is all to just keep eDir from being hit with each transaction? I
don't think IDM generates the Mapping Table new with each transaction
that way. It's possible that it does, I suppose, but I'd be surprised.
~ None of the other policies, settings, or data structures are generated
during runtime (which is why restarting the driver is required for any
change) so this would be the exception. Are you sure this is benefiting
you?
Good luck.
cfiegert wrote:
| HI
|
| I'm trying to parse a mapping table to force to utilise a value from
| it. I'd like to do this to stop querying the directory every time to
| buld the node.
|
| I am able to retrieve the data and do a for loop, but i'm stuck with
| how to pull the values out of the resulting nodeset.
|
| The code below seems to setup the nodeset and decode it, but its in the
| format of
|
| <row>
| <col>TSC</col>
| <col>\TSC\TSC-USERS</col>
| </row>
|
| I only need to utilise the second column information.
|
| <do-set-local-variable name="var_mytable1"
scope="policy">
| <arg-node-set>
| <token-xml-parse>
| <token-base64-decode>
| <token-src-attr name="DirXML-Data">
| <arg-dn>
| <token-text>X\Library\eDir Placement Table
Table</token-text>
| </arg-dn>
| </token-src-attr>
| </token-base64-decode>
| </token-xml-parse>
| </arg-node-set>
| </do-set-local-variable>
| <do-for-each>
| <arg-node-set>
| <token-local-variable name="var_mytable1"/>
| </arg-node-set>
| <arg-actions>
| <do-set-local-variable name="var_test"
scope="policy">
| <arg-string>
| <token-local-variable name="current-node"/>
| </arg-string>
| </do-set-local-variable>
| </arg-actions>
| </do-for-each>
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIIk503s42bA80+9kRAis1AJ9Ts8RfWZ0ZS+P1bvkDyepR67+jxwCfYjvU
ukFVudJbWuEfLE45z+UWBVQ=
=RsOP
|
| Post Reply
|
| Re: parsing a mapping table |
 |
Thu, 08 May 2008 01:36:01 GMT |
Pretty sure. Probably didnt explain it too well.
On each relevent operation (say a modify of a user) I have 2 options as
I see it.
1 - Do a query and return a nodeset to be parsed which will generate a
lot of traffic as the tree is large.
2 - Parse a map table that has static values and use that, and as its
only read at runtime and cached, reducing the eDir load.
The values are static and in fact are only a list of OUs in the tree.
So ideally I can pull back the map table and use that.
I guess another option is to use a GCV and parse that, but the map
table already exists in the driver so it would be nice to use.
--
cfiegert
------------------------------------------------------------------------
cfiegert's Profile: http://forums.novell.com/member.php?userid=9337
View this thread: http://forums.novell.com/showthread.php?t=327074
|
| Post Reply
|
| Re: parsing a mapping table |
 |
Thu, 08 May 2008 01:43:47 GMT |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Are you sure you're using it correctly? Typically with a Mapping Table
you provide a value (say, an OU attribute which should then be used to
decide placement in the tree by mapping to a DN specified in the table)
and it returns the mapped value (the DN). There's a good CoolSolution
on this exact task even:
http://www.novell.com/coolsolutions/feature/19637.html
See if that is what you are wanting to do and, if so, it may help you do
it much more-simply.
Good luck.
cfiegert wrote:
| Pretty sure. Probably didnt explain it too well.
|
| On each relevent operation (say a modify of a user) I have 2 options as
| I see it.
|
| 1 - Do a query and return a nodeset to be parsed which will generate a
| lot of traffic as the tree is large.
|
| 2 - Parse a map table that has static values and use that, and as its
| only read at runtime and cached, reducing the eDir load.
|
| The values are static and in fact are only a list of OUs in the tree.
|
| So ideally I can pull back the map table and use that.
|
| I guess another option is to use a GCV and parse that, but the map
| table already exists in the driver so it would be nice to use.
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIIlrR3s42bA80+9kRAt5DAJ4o+HYqKazogM6l+oL3mYRe6JSTggCaA9w/
TEKCMPVe38PrhfabC7Ciybk=
=yD8A
|
| Post Reply
|
| Re: parsing a mapping table |
 |
Thu, 08 May 2008 13:51:28 GMT |
On Thu, 08 May 2008 01:36:01 GMT, cfiegert
<cfiegert@no-mx.forums.novell.com> wrote:
>2 - Parse a map table that has static values and use that, and as its
>only read at runtime and cached, reducing the eDir load.
Mapping Tables are cached, and only re-read if they change. Just use the
mapping table as designed.
---------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Novell Support Forums Volunteer SysOp http://forums.novell.com
|
| Post Reply
|
|
|
|
|
|
|
|
|
|