[j-nsp] Commit script paths
Phil Shafer
phil at juniper.net
Mon Apr 16 14:18:11 EDT 2007
[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;
/* ... */
}
Thanks,
Phil
More information about the juniper-nsp
mailing list