[j-nsp] sequential commands in SLAX
Martin T
m4rtntns at gmail.com
Thu Jan 14 04:23:49 EST 2016
Hi,
while I am aware of jcs:open() function, which allows one to execute
commands on other routing-engine, I was wondering if following logic
is also possible in SLAX:
$ cat login_to_other_re.slax
version 1.0;
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
import "../import/junos.xsl";
match / {
<op-script-results> {
/* rlogin to second RE */
var $cmd_login_other_re = <command> "request routing-engine login
other-routing-engine";
var $cmd_login_other_re_results = jcs:invoke( $cmd_login_other_re );
/* print out the name of the second RE */
<output> $junos-context//routing-engine-name;
/* exit rlogin session */
var $cmd_quit_other_re = <command> "quit";
var $cmd_quit_other_re_results = jcs:invoke( $cmd_quit_other_re );
}
}
$
Why doesn't such approach work?
thanks,
Martin
More information about the juniper-nsp
mailing list