Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Automation Scripting User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

How Op Scripts Work

date_range 13-Jan-21

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

You enable op scripts by listing the filenames of one or more op script files within the [edit system scripts op] hierarchy level. To execute local op scripts, you must add the files to the appropriate op script directory on the device. For more information about op script file directories, see Storing and Enabling Scripts. Once added to the device, op scripts are invoked from the command line, using the op filename command.

You can also store and execute op scripts from a remote site. Remote op scripts are invoked from the command line using the op url url command. For more information about executing remote op scripts, see Executing an Op Script from a Remote Site.

You can use op scripts to generate changes to the device configuration. 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.

footer-navigation