Skip to content

Instantly share code, notes, and snippets.

@tonusoo
Created May 21, 2020 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonusoo/9e343660c23b35c74630760dcf96b24b to your computer and use it in GitHub Desktop.
Save tonusoo/9e343660c23b35c74630760dcf96b24b to your computer and use it in GitHub Desktop.
version 1.1;
ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
import "../import/junos.xsl";
match configuration {
var $rpc = <get-configuration database-path=$junos-context/commit-context/database-path>;
var $config = jcs:invoke($rpc);
var $group_name = "ND6";
var $nd6_stale_time = "600";
var $int_type = "irb";
<change> {
<groups> {
<junos:comment> "Group content is populated by " _ $script;
<name> $group_name;
<interfaces> {
<interface operation="replace"> {
<name> $int_type;
for-each ($config/interfaces/interface[name == $int_type]/unit/family/inet6) {
<unit> {
<name> ../../name;
<family> {
<inet6> {
<nd6-stale-time> $nd6_stale_time;
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment