On Mon, Apr 16, 2007 at 02:18:11PM -0400, Phil Shafer
wrote:
> [Doing the Happy Dance over the first commit script
question]
>
> Richard A Steenbergen writes:
> >Maybe I'm missing something really obvious here,
but how do you change
> >your current context (dot) to the top level in
commit scripts (slax
> >specifically)?
>
> The simplest way is to save the top before you
descend:
>
> var $top = .;
> for-each (protocols/bgp/group/neighbor[peer-as !=
1234]) {
> call jcs:emit-change($tag = 'transient-change',
$dot = $top, ...);
> }
>
> Or you can find the node from the top:
>
> for-each (protocols/bgp/group/neighbor[peer-as !=
1234]) {
> var $top = /commit-script-input/configuration;
> /* ... */
> }
After much trial and error (lots of error) I found a way to
fudge it by
doing "//policy-options", but strangely enough it
doesn't work for just
"//", or
"//groups/something/policy-options". Not sure if
that is fully
supported, but I figure it's worth noting for the mailing
list archives
incase someone else is trying the same thing I am.
--
Richard A Steenbergen <ras e-gerbil.net> http://www.e-gerbil.net/r
as
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41
5ECA F8B1 2CBC)
_______________________________________________
juniper-nsp mailing list juniper-nsp puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp
|