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
python-script [name] named-item
| Synopsis | Enter the python-script list instance | |
| Context | configure python python-script named-item | |
| Tree | python-script | |
Description | Commands in this context configure Python scripts to modify messages of different protocols. | |
| Max. instances | 256 | |
| Introduced | 25.3.R2 | |
Platforms | SAR Gen 2 |
[name] named-item
| Synopsis | Python script policy name | |
| Context | configure python python-script named-item | |
| Tree | python-script | |
| String length | 1 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. | |
| Introduced | 25.3.R2 | |
Platforms | SAR Gen 2 |
action-on-fail keyword
| Synopsis | Action taken when the Python execution fails | |
| Context | configure python python-script named-item action-on-fail keyword | |
| Tree | action-on-fail | |
| Options | ||
Default |
drop | |
| Introduced | 25.3.R2 | |
Platforms | SAR Gen 2 |
admin-state keyword
| Synopsis | Administrative state of the Python script | |
| Context | configure python python-script named-item admin-state keyword | |
| Tree | admin-state | |
| Options | ||
|
Default | disable | |
| Introduced | 25.3.R2 | |
Platforms |
SAR Gen 2 |
description description
| Synopsis | Text description | |
| Context | configure python python-script named-item description description | |
| Tree | description | |
| String length | 1 to 80 | |
| String format | 'string-not-all-spaces' must contain at least one non-space character | |
| Introduced | 25.3.R2 | |
Platforms | SAR Gen 2 |
protection
| Synopsis | Enter the protection context | |
| Context | configure python python-script named-item protection | |
| Tree | protection | |
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. | |
| Introduced | 25.3.R2 | |
Platforms | SAR Gen 2 |
hmac-sha256 encrypted-leaf
| Synopsis | Hash value to include as first line in Python script | |
| Context | configure python python-script named-item protection hmac-sha256 encrypted-leaf | |
| Tree | hmac-sha256 | |
| String length | 1 to 254 | |
| Introduced | 25.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 | |
| Tree | run-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 length | 1 to 32 | |
| String format | 'string-not-all-spaces' must contain at least one non-space character | |
| Introduced | 26.7.R1 | |
Platforms | SAR Gen 2 |
urls url
| Synopsis | Script location in URL format | |
| Context | configure python python-script named-item urls url | |
| Tree | urls | |
| String length | 1 to 180 | |
| Max. instances | 3 | |
Notes | This element is ordered by the user. | |
| Introduced | 25.3.R2 | |
Platforms | SAR Gen 2 |
version keyword
|
Warning: Modifying this element recreates the parent element automatically for the new value to take effect. | ||
| Synopsis | Python version the script is written for | |
| Context | configure python python-script named-item version keyword | |
| Tree | version | |
| Options | ||
|
Default | python2 | |
| Introduced | 26.7.R1 | |
Platforms |
SAR Gen 2 | |