40. python Commands

configure
python
— apply-groups reference
— apply-groups-exclude reference
python-policy string
— apply-groups reference
— apply-groups-exclude reference
cache
admin-state keyword
— apply-groups reference
— apply-groups-exclude reference
entry-size number
max-entries number
max-entry-lifetime number
— apply-groups reference
— apply-groups-exclude reference
ip-address reference
sync-tag string
high-availability number
persistence number
persistence boolean
description string
dhcp keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
dhcp6 keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
diameter keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
gtpv1-c keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
gtpv2-c keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
nat-group reference
pppoe keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
radius keyword direction keyword
— apply-groups reference
— apply-groups-exclude reference
script reference
syslog
— apply-groups reference
— apply-groups-exclude reference
script reference
vsd
— apply-groups reference
— apply-groups-exclude reference
script reference
wlan-gw-group reference
python-script string
action-on-fail keyword
admin-state keyword
— apply-groups reference
— apply-groups-exclude reference
description string
hmac-sha256 string
urls string
version keyword

40.1. python Command Descriptions

python

Synopsis

Enter the python context

Context
Tree
Introduced

16.0.R1

Platforms

All

python-policy [name] string

Synopsis

Enter the python-policy list instance

Max. Elements

64

Introduced

16.0.R1

Platforms

All

[name] string

Synopsis

Python policy name

String Length

1 to 32

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

cache

Synopsis

Enable the cache context

Tree
Introduced

16.0.R1

Platforms

All

admin-state keyword

Synopsis

Administrative state of the Python cache

Default

disable

Options

enable, disable

Introduced

16.0.R1

Platforms

All

entry-size number

Warning:

Modifying this element toggles the admin-state of the parent element automatically for the new value to take effect.

Synopsis

Maximum size of the data structure to be stored in a single Python cache entry

Range

32 to 2048

Default

256

Units

bytes

Introduced

16.0.R1

Platforms

All

max-entries number

Warning:

Modifying this element toggles the admin-state of the parent element automatically for the new value to take effect.

Synopsis

Maximum number of Python cache entries to be stored in the cache of this Python policy

Range

1 to 1000000

Default

128000

Introduced

16.0.R1

Platforms

All

max-entry-lifetime number

Synopsis

Maximum lifetime allowed for each entry of the Python cache of this Python policy

Range

1 to 604800

Default

86400

Units

seconds

Introduced

16.0.R1

Platforms

All

mcs-peer

Synopsis

Enable the mcs-peer context

Tree
Introduced

16.0.R1

Platforms

All

ip-address reference

Synopsis

IP address of the Multi-Chassis Redundancy Synchronization (MCS) peer

Reference

configure redundancy multi-chassis peer (ipv4-address-no-zone | ipv6-address-no-zone)

Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

sync-tag string

Synopsis

Python policy cache that is uniquely identified within the scope of MCS peer

Tree
String Length

1 to 32

Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

minimum-lifetimes

Synopsis

Enter the minimum-lifetimes context

Introduced

16.0.R1

Platforms

All

high-availability number

Synopsis

Minimum value for the remaining lifetime of any cache entry to be synchronized with standby CPM

Range

1 to 600

Units

seconds

Introduced

16.0.R1

Platforms

All

multi-chassis-redundancy number

Synopsis

Minimum value for the remaining lifetime of any cache entry to be synchronized with peer system

Range

1 to 600

Units

seconds

Introduced

16.0.R1

Platforms

All

persistence number

Synopsis

Minimum value for the remaining lifetime of any cache entry to be written to system persistence

Range

1 to 1800

Units

seconds

Introduced

16.0.R1

Platforms

All

persistence boolean

Warning:

Modifying this element toggles the admin-state of the parent element automatically for the new value to take effect.

Synopsis

Allow persistency support for the cached entries of the Python policy

Default

false

Introduced

16.0.R1

Platforms

All

description string

Synopsis

Text description

String Length

1 to 80

Introduced

16.0.R1

Platforms

All

dhcp [message-type] keyword direction keyword

Synopsis

Enter the dhcp list instance

Context

configure python python-policy string dhcp keyword direction keyword

Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

DHCP message type

Context

configure python python-policy string dhcp keyword direction keyword

Options

discover, offer, request, decline, ack, nak, release, inform, force-renew, lease-query, lease-unassigned, lease-unknown, lease-active

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context

configure python python-policy string dhcp keyword direction keyword

Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string dhcp keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

dhcp6 [message-type] keyword direction keyword

Synopsis

Enter the dhcp6 list instance

Context

configure python python-policy string dhcp6 keyword direction keyword

Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

DHCPv6 message type

Context

configure python python-policy string dhcp6 keyword direction keyword

Options

solicit, advertise, request, confirm, renew, rebind, reply, release, decline, reconfigure, info-request, relay-forward, relay-reply

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context

configure python python-policy string dhcp6 keyword direction keyword

Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string dhcp6 keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

diameter [message-type] keyword direction keyword

Synopsis

Enter the diameter list instance

Context
Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

Diameter message type

Context
Options

ccr, cca, rar, raa, cer, cea, dwr, dwa, dpr, dpa, asr, asa, aar, aaa

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context
Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string diameter keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

gtpv1-c [message-type] keyword direction keyword

Synopsis

Enter the gtpv1-c list instance

Context
Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

GTPv1-C message type

Context
Options

echo-request, echo-response, version-not-supported, create-pdp-context-request, create-pdp-context-response, delete-pdp-context-request, delete-pdp-context-response, error-indication, end-marker

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context
Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string gtpv1-c keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

gtpv2-c [message-type] keyword direction keyword

Synopsis

Enter the gtpv2-c list instance

Context
Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

GTPv2-C message type

Context
Options

echo-request, echo-response, version-not-supported, create-session-request, create-session-response, modify-bearer-request, modify-bearer-response, delete-session-request, delete-session-response, delete-bearer-request, delete-bearer-response, release-access-bearers-request, release-access-bearers-response, downlink-data-notification, downlink-data-notification-ack, change-notification-request, change-notification-response, stop-paging-indication

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context
Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string gtpv2-c keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

nat-group reference

Warning:

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

Synopsis

NAT ISA group for this Python policy

Context
Tree
Reference
Notes

The following are part of a choice: nat-group or wlan-gw-group.

Introduced

16.0.R1

Platforms

7450 ESS, 7750 SR, 7750 SR-e, 7750 SR-s

pppoe [message-type] keyword direction keyword

Synopsis

Enter the pppoe list instance

Context

configure python python-policy string pppoe keyword direction keyword

Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

PPPoE message type

Context

configure python python-policy string pppoe keyword direction keyword

Options

session-lcp, session-pap, session-chap, session-ipcp, session-ip6cp, pado, padi, padr, pads, padt

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context

configure python python-policy string pppoe keyword direction keyword

Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string pppoe keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

radius [message-type] keyword direction keyword

Synopsis

Enter the radius list instance

Context
Tree
Introduced

16.0.R1

Platforms

All

[message-type] keyword

Synopsis

RADIUS message type

Context
Options

access-request, access-accept, access-reject, accounting-request, accounting-response, access-challenge, disconnect-request, change-of-authorization-request

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

direction keyword

Synopsis

Event that is either incoming or outgoing

Context
Options

ingress, egress

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the message specified by message-type

Context

configure python python-policy string radius keyword direction keyword script reference

Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

syslog

Synopsis

Enable the syslog context

Tree
Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for outgoing syslog messages

Context
Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

vsd

Synopsis

Enable the vsd context

Tree
Introduced

16.0.R1

Platforms

All

script reference

Synopsis

Python script name for the received XMPP Service-Config response messages

Context
Tree
Reference
Notes

This element is mandatory.

Introduced

16.0.R1

Platforms

All

wlan-gw-group reference

Warning:

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

Synopsis

WLAN ISA group for this Python policy

Context
Reference
Notes

The following are part of a choice: nat-group or wlan-gw-group.

Introduced

16.0.R1

Platforms

7750 SR, 7750 SR-e, 7750 SR-s

python-script [name] string

Synopsis

Enter the python-script list instance

Max. Elements

256

Introduced

16.0.R1

Platforms

All

[name] string

Synopsis

Python script policy name

String Length

1 to 32

Notes

This element is part of a list key.

Introduced

16.0.R1

Platforms

All

action-on-fail keyword

Synopsis

Action taken when Python fails to modify the given message

Default

drop

Options

passthrough, drop

Introduced

16.0.R1

Platforms

All

admin-state keyword

Synopsis

Administrative state of the Python script

Context
Default

disable

Options

enable, disable

Introduced

16.0.R1

Platforms

All

description string

Synopsis

Text description

String Length

1 to 80

Introduced

16.0.R1

Platforms

All

protection

Synopsis

Enter the protection context

Introduced

16.0.R1

Platforms

All

hmac-sha256 string

Synopsis

Python script to consist of the hash value as obtained by the hmac-sha256 hashing algorithm

String Length

1 to 199

Introduced

16.0.R1

Platforms

All

urls string

Synopsis

The script locations in URL format

Context
Tree
String Length

1 to 180

Max. Elements

3

Notes

This element is ordered by the user.

Introduced

16.0.R4

Platforms

All

version keyword

Warning:

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

Synopsis

the version of Python this script is written for.

Context
Tree
Default

python2

Options

python2, python3

Introduced

21.2.R1

Platforms

All