Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

op

Syntax

Description

Execute an op script. To execute local op scripts, you must configure the op script filename at the [edit system scripts op file] hierarchy level.

Op scripts can be stored in one of the following locations:

  • On the local device in the /var/db/scripts/op directory on the hard disk

  • On the local device in the /config/scripts/op directory on the flash drive.

    To execute op scripts from the flash drive, you must configure the load-scripts-from-flash statement at the [edit system scripts] hierarchy level.

  • At a remote URL

Op scripts are executed with the access privileges of the user who invokes the command to execute the script.

Note:

If you include the op url command under the [edit event-options policy policy-name then execute-commands commands] hierarchy to execute a remote op script as an event policy action, Python scripts are executed using the access privileges of the generic, unprivileged user and group nobody. If you do not configure the user-name statement, SLAX and XSLT scripts are executed with root privileges.

Options

detail

(Optional) Display detailed output.

argument-name argument-value

(Optional) Specify one or more arguments to the script. For each argument you include on the command line, you must specify a corresponding value for the argument.

key (md5 | sha-256 | sha1) key-value

(Optional) With the url option, specify a checksum hash to verify the integrity of the remote op script.

Starting in Junos OS Release 18.2R2 and 18.3R1, Junos OS supports only the SHA-256 hash function for script checksum hashes. Earlier releases support the MD5, SHA-1, and SHA-256 hash functions.

url url

(Optional) Specify the URL for a remote script.

Note:

Statements configured under the [edit system scripts op] hierarchy level are only enforced for op scripts that are local to the device. If you configure memory allocation, script dampening, script start options, traceoptions, or other op script-specific statements within that hierarchy, the device does not apply the configuration when you execute a remote script using the op url command.

Additional Information

For more information about op scripts, see the Automation Scripting User Guide.

Required Privilege Level

maintenance

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

op

op url

Release Information

Command introduced in Junos OS Release 7.6.

key option introduced in Junos OS Release 10.0.

url option introduced in Junos OS Release 10.0.