So, I'm still working my way through slax, and have a couple of successful scripts, but not really feeling confident in my level of understanding/familiarity yet. I'm trying to modify one of my working commiit scripts to incorporate additional changes that uses the jcs:emit-change call. Previously the location of the change was bridge-domains/domain[name == "CPEMGMT"], but now that I need to make changes under the protocols section, I need to move the $dot back to the top level. I get the feeling that I've done more than one thing wrong here:
/* variable to equal where to make the change */
var $dot = "/";
/* variable to equal the config added */
var $content = {
<bridge-domains> {
<name> "CPEMGMT";
<interface> $logical;
}
<protocols> {
<oam> {
<ethernet> {
<link-fault-management> {
<interface> {
<name> $ifname;
<pdu-interval> 1000;
}
}
}
}
}
}
/* change function call */
call jcs:emit-change($dot, $message, $content);
My immediate need is to fix this script, but I'm also very interested in what troubleshooting steps I could employ to help isolate WHERE in my script there is a problem, so I know where to focus. If I could learn how to debug these better, I think I could learn much faster. Here is the error message I'm seeing:
{master}[edit]
JoshTX@re0.router01# show | display commit-scripts
error: Invalid type
error: runtime error: file /var/db/scripts/import/junos.xsl line 152 element param
error: Failed to evaluate the expression of variable 'name'.
error: 3 errors reported by commit scripts
error: commit script failure
Pointers are appreciated,
Josh