allow-url-for-python (Op Scripts)
Statement introduced in Junos OS Release 16.1R1.
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.
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.
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 this statement in
maintenance-control—To add this statement to the configuration.