Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
Overview Commit script boilerplate recommended for SLAX 1.1 use in Junos OS Release 12.2 or later
See matching posts in thread - commit script question...I wish to...
Configure and Execute a Commit Script The script needs to be configured in the following configuration hierarchy: 1 [edit system scripts commit file <script-name>] Each configured commit script gets executed every time a commit is processed
Transient configuration changes can be emitted from a commit script. To emit the transient configuration changes, emit the changes in tag <transient-change> as follows: 1 <transient-change> ( 2 < system > ( 3 <hostname> "hostname" ; 4 ) 5 ) Transient changes are not visible from the CLI. Transient changes will be the part of command "show | display commit-scripts". #commitscript #How-To
Transient configuration changes can be emitted from a commit script. To emit the transient configuration changes, emit the changes in tag <transient-change> as follows: 1 <transient-change> ( 2 <system> ( 3 <hostname> "hostname"; 4 ) 5 ) Transient changes are not visible from the CLI. Transient changes will be the part of command "show | display commit-scripts". #ScriptingHow-To #commitscript #How-To #Slax
See matching posts in thread - Commit auto backup script...RE: Co...
Classify Interfaces by Their VC Numbers For SLAX version 1.0 and higher, you can use the check-atm-interfaces script to classify interfaces by their VC numbers and place them into groups. Using this script, you can allocate bandwidth to interfaces with more traffic. The script sets classifications based on VC numbers and adds bronze, sliver, or gold variables to each interface. You can use this script for a connection with large traffic to organize its bandwidth based on priority
Use Local Scripts with an External Data Set This article shows how to pull information from an external data set (XML file) to use in a local (commit) script to configure devices that may or may not have unique configuration needs. Before getting started, you should review SLAX and local/commit scripts information in Junos Space: SLAX Junos Space Local Scripts Junos Space enables you to upload and execute local (commit) scripts on any given device
Use the add-accept Script for Firewall Filters For SLAX version 1.0 and higher, you can use the add-accept script to add a 'then accept' statement to firewall filters that do not have one
View the Post-Inheritance Configuration of a Commit Script To display the XML format of the post-inheritance configuration: 1 [edit] 2 user@host # show | display commit-scripts view To display all configuration group data, including script-generated changes to the groups: 1 [edit] 2 user@host # show groups | display commit-scripts To save the commit script input to a file, add the save command to the command line: 1 [edit] 2 user@host # show | display commit-scripts view | save filename.xml #ScriptingHow-To #xml #How-To #configlet #commitscript