Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

How Op Scripts Work

Op scripts execute Junos OS operational commands and inspect the resulting output. After inspection, op scripts can automatically correct errors within the device running Junos OS based on this output.

You add op scripts to device operations by listing the filenames of one or more op script files within the [edit system scripts op] hierarchy level. These files must be added to the appropriate op script file directory. For more information about op script file directories, see Storing Scripts in Flash Memory. Once added to the device, op scripts are invoked from the command line, using the op filename command.

You can use op scripts to generate changes to the device configuration by including the <load-configuration> tag element. Because the changes are loaded before the standard validation checks are performed, they are validated for correct syntax, just like statements already present in the configuration before the script is applied. If the syntax is correct, the configuration is activated and becomes the active, operational device configuration.

Figure 1 shows a high-level view of the flow of op script input and output.

Figure 1: Op Script Input and Output

Op Script Input and Output

Published: 2013-08-09

Published: 2013-08-09