python commands

configure 
python 
apply-groups reference
apply-groups-exclude reference
python-script named-item 
action-on-fail keyword
admin-state keyword
apply-groups reference
apply-groups-exclude reference
description description
protection 
hmac-sha256 encrypted-leaf
run-as-user named-item
urls url
version keyword

python command descriptions

python

Synopsis Enter the python context
Context configure python
Treepython
Introduced25.3.R2

Platforms

SAR Gen 2

python-script [name] named-item

Synopsis Enter the python-script list instance
Contextconfigure python python-script named-item
Treepython-script

Description

Commands in this context configure Python scripts to modify messages of different protocols.

Max. instances256
Introduced25.3.R2

Platforms

SAR Gen 2

[name] named-item
Synopsis Python script policy name
Context configure python python-script named-item
Treepython-script
String length1 to 32
String format'string-not-all-spaces' must contain at least one non-space character

Notes

This element is part of a list key.

Introduced25.3.R2

Platforms

SAR Gen 2

action-on-fail keyword
Synopsis Action taken when the Python execution fails
Contextconfigure python python-script named-item action-on-fail keyword
Treeaction-on-fail
Optionspassthrough, drop

Default

drop

Introduced25.3.R2

Platforms

SAR Gen 2

admin-state keyword
Synopsis Administrative state of the Python script
Contextconfigure python python-script named-item admin-state keyword
Treeadmin-state
Optionsenable, disable

Default

disable

Introduced 25.3.R2

Platforms

SAR Gen 2

description description
Synopsis Text description
Context configure python python-script named-item description description
Treedescription
String length1 to 80
String format'string-not-all-spaces' must contain at least one non-space character
Introduced25.3.R2

Platforms

SAR Gen 2

protection
Synopsis Enter the protection context
Context configure python python-script named-item protection
Treeprotection

Description

Commands in this context configure the format of the Python script file or files in this Python script. Unintentional changing of Python script file can be prevented by using the protected format.

Introduced25.3.R2

Platforms

SAR Gen 2

run-as-user named-item
Synopsis Local user authenticated for scripts
Context configure python python-script named-item run-as-user named-item
Treerun-as-user

Description

This command configures a user that is different from the current user of the session. Script authentication, authorization, accounting, and any activity within the script, is run as the specified user.

This user must be locally configured and script authorization will use the user's local AAA profile even if remote authorization is configured.

If this command is not configured, the current user of the session is used.

String length1 to 32
String format'string-not-all-spaces' must contain at least one non-space character
Introduced26.7.R1

Platforms

SAR Gen 2

urls url
Synopsis Script location in URL format
Context configure python python-script named-item urls url
Treeurls
String length1 to 180
Max. instances3

Notes

This element is ordered by the user.

Introduced25.3.R2

Platforms

SAR Gen 2

version keyword
Warning:

Modifying this element recreates the parent element automatically for the new value to take effect.

SynopsisPython version the script is written for
Contextconfigure python python-script named-item version keyword
Treeversion
Optionspython2, python3

Default

python2

Introduced 26.7.R1

Platforms

SAR Gen 2