Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
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

allow-url-for-python (Op Scripts)

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
allow-url-for-python;

Hierarchy Level

content_copy zoom_out_map
[edit system scripts op]

Description

Enable the execution of Python op scripts from a remote site.

When you configure the language python or language python3 statement at the [edit system scripts] hierarchy level, you can execute local Python scripts on a device running Junos OS. In order to execute Python op scripts from a remote site, you must also configure the allow-url-for-python statement.

To verify the integrity of the remote op script before it runs on the device, you can optionally confirm the checksum hash for the script. To determine the checksum, use the file checksum operational mode command. When you run the op url command you can provide the hash value for that script by using the key option. If the calculated and specified values do not match, script execution fails.

Note:

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.

The no-allow-url statement takes precedence over the allow-url-for-python statement; if both statements are configured, you cannot execute Python op scripts from a remote site on the device.

Default

If you do not include the allow-url-for-python statement, you cannot execute Python op scripts from a remote site, and the op url command generates an error.

Required Privilege Level

maintenance—To view or add this statement in the configuration.

Release Information

Statement introduced in Junos OS Release 16.1R1.

footer-navigation