[Contents] [Prev] [Next] [Index] [Report an Error]


Comparing Commit Scripts and Op Scripts

Commit and op scripts are similar in many ways. Both are written in Extensible Stylesheet Language Transformations (XSLT) and are based on two application programming interfaces (APIs): the JUNOS extensible markup language (XML) API and the JUNOScript API. Both types of scripts allow you to customize and control the operation of your routing platform. Both can perform any function available through JUNOS XML and JUNOScript remote procedure calls (RPCs).

The JUNOS software includes a single XSLT processor that controls commit and op scripts, and defines all the XSLT extension functions and named templates available with both types of scripts. These extension functions and named templates allow you to perform operations in your scripts that are otherwise difficult or impossible to perform with standard XSLT and XPath. (For more information, see JUNOS Extension Functions and JUNOS Named Templates.)

Commit scripts and op scripts are essentially the same machinery, called at different times, with different input and different output. The differences between commit and op scripts are as follows:

For example, both commit and op scripts can inspect and change a configuration. With commit scripts, the inspection happens each time a new candidate configuration is committed. With op scripts, the inspection happens in response to a system event or when you decide to manually run the op script. For a more thorough overview, see Commit Scripts Overview and Op Scripts Overview.


[Contents] [Prev] [Next] [Index] [Report an Error]