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
|
Field |
Description |
|---|---|
|
substitution.<xyz> |
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 http://docs.python.org/ref/keywords.html. |
|
loginType |
The type of subscriber session, one of the following:
|
|
loginName |
Login name provided by a subscriber |
|
userName |
Username portion of the loginName |
|
domainName |
Domain name portion of the loginName |
|
serviceBundle |
Content of the vendor-specific RADIUS attribute for service bundle |
|
radiusClass |
RADIUS class used for authorization |
|
virtualRouterName |
Name of virtual router in the format vrname@hostname |
|
interfaceName |
Name of the interface |
|
ifAlias |
Description of the interface configured on the router |
|
ifDesc |
Alternate name for the interface. This is the name used by the Simple Network Management Protocol (SNMP). On a JUNOSe router the format of the description is: ip<slot>/<port>.<subinterface> On a JUNOS routing platform, ifDesc is the same as interfaceName. |
|
nasPortId |
Port identifier of an interface, including the interface name and additional layer 2 information (for example, fastEthernet 3/1) |
|
macAddress |
Text representation of the MAC address for the DHCP subscriber (for example. 00:11:22:33:44:55) |
|
retailerDn |
Distinguished name of the retailer |
|
nasIp |
Network access server IP address of the router |
|
dhcp |
DHCP options. See Overview of Classification Scripts . |
|
primaryUserName |
PPP or DHCP username. This name does not change when the subscriber logs in through a portal. |
