Using Python Expressions in a Subscriber Reference Expression
You can compose Python expressions from one or more of the fields in Table 1 for the definition of a subscriber reference expression of a fragment service. You enter these expressions with the expression option of the services scope name service name aggregate fragment or edit services global service name aggregate fragment statement.
Table 1: Fields Used in Python Expressions for Aggregate Services
Value of the parameter <xyz>.
Substitutions are acquired by means of the regular acquisition path for service sessions.
The names of parameters are restricted to valid Python identifiers, such as ‘ALPHA/” _” *(ALPHA/ DIGIT/” _” )’, with the exception of keywords, such as for, if, while, return, and, or, not, def, class, try, exceptFor the full list of Python keywords, see https://docs.python.org/2/library/.
The type of subscriber session, one of the following:
Login name provided by a subscriber
Username portion of the loginName
Domain name portion of the loginName
Content of the vendor-specific RADIUS attribute for service bundle
RADIUS class used for authorization
Name of virtual router in the format vrname@hostname
Name of the interface
Description of the interface configured on the router
Alternate name for the interface. This is the name used by the Simple Network Management Protocol (SNMP).
On a router running JunosE Software, the format of the description is:
On a router running Junos OS, ifDesc is the same as interfaceName.
Type of the interface. The values could be IP for IPv4; IPV6 for IPv6; IP,IPV6 for dual-stack interface.
Port identifier of an interface, including the interface name and additional layer 2 information (for example, fastEthernet 3/1)
Text representation of the MAC address for the DHCP subscriber (for example. 00:11:22:33:44:55)
Distinguished name of the retailer
Network access server IP address of the router
DHCP options. See Classification Scripts Overview.
PPP or DHCP username. This name does not change when the subscriber logs in through a portal.
Configures a condition that uses the IPv6 address prefix.
framedIpv6Prefix is available for JunosE (COPS-PR), Junos OS (JSRC), as well as AAA (COA).
Delegated IPv6 prefix for the subscriber.
Using the delegatedIpv6Prefix attribute, the NAS can receive a set of IPv6 prefixes that are delegated to subscribers. An IPv6 subscriber can be identified through multiple prefixes by using the delegatedIpv6Prefix attribute with the framedIpv6Prefix attribute.
delegatedIpv6Prefix is available for Junos OS (JSRC), AAA (COA), and DHCPv6 subscribers on the JunosE router.