Curtis Call <[email protected]> writes: > Junos 12.1 added new options for the <get-configuration> > commit-scripts attribute, apply and apply-no-transients, that allow > you to retrieve the post-commit-script configuration, and prior to > Junos 12.1 you could always do something like <command> "show > configuration | display xml | display commit-scripts" (be aware that > the returned XML structure will be different than > <get-configuration>), however, these work by running the configuration > through the commit scripts again, so if you try to call them from a > commit script you're liable to get a loop.
Ah clever idea, but you are right, it would loop. It could only work if there was a way to get the actual configuration as it was applied after the commit scripts of the last commit, without having to actually rerun the commit script. > Why not just have your commit script automatically add the unit number > to the apply-macros. i.e. if the unit number is already present in the > macro then use it for the logical interface, but if it is missing then > figure out the first unused number, use it for the interface, and > record it in the macro. Yes that sounds like a workable solution. Thank you! /Benny _______________________________________________ juniper-nsp mailing list [email protected] https://puck.nether.net/mailman/listinfo/juniper-nsp

