Universal Port Variables
Universal Port uses CLI Scripting variables to make system and trigger event information available to profiles. For more information, see Using CLI Scripting.
Variables allow you to create profiles and scripts that respond to the state of the switch as defined in the variables. When a profile is triggered, the system passes variables to the profile. You can also create and use variables of your own. User-defined variables are limited to the current context unless explicitly saved.

Note
You must enable CLI scripting before using variables or executing a script.If you save variables (as described in Saving, Retrieving, and Deleting Session Variables), certain data from one profile can be reused in another profile for another event. For example, between login and logout events, the data necessary for the rollback of a port configuration can be shared.
Common Variables
Common Variables shows the variables that are always available for use by any script. These variables are set up for use before a script or profile is executed.
Variable Syntax | Definition |
---|---|
$STATUS | Status of last command execution. |
$CLI.USER | Username for the user who is executing this CLI. |
$CLI.SESSION_ID | An identifier for a session. This identifier is available for the roll-back event when a device or user times out. |
$CLI.SESSION_TYPE | Type of session of the user. |
$EVENT.NAME | This is the event that triggered this profile. |
$EVENT.TIME | Time this event occurred. The time is in seconds since epoch. |
$EVENT.TIMER_TYPE | Type of timer, which is periodic or non_periodic. |
$EVENT.TIMER_NAME | Name of the timer that the Universal Port is invoking. |
$EVENT.TIMER_LATE_SECS | Time difference between when the timer fired and when the actual shell was run in seconds. |
$EVENT.PROFILE | Name of the profile that is being run currently. |
User Profile Variables
User Profile Variables shows the variables available to user profiles.
Variable Syntax | Definition |
---|---|
$EVENT.USERNAME | Name of user authenticated. This is a string with the MAC address for MAC-based user-login. |
$EVENT.NUMUSERS | Number of authenticated
supplicants on this port after this event occurred. Note: For user-authenticated events, the initial
value of this variable is 0. For user unauthenticated events,
the initial value is 1.
|
$EVENT.USER_MAC | MAC address of the user. |
$EVENT.USER_PORT | Port associated with this event. |
$EVENT.USER_VLAN | VLAN associated with
this event or user. Note: If the VLAN is
assigned dynamically, and the name is not available at the time
of authentication, “$EVENT.USER_VLAN” is returned as “<Not
Found> xxx” where xxx is the VLAN number. This is not translated
by UPM VLAN processing and appears for diagnostic purposes
only.
|
$EVENT.USER_ALL_VLANS | When a user is authenticated to multiple VLANs, this variable includes all VLANs for which the user is authenticated. |
$EVENT.USER_IP | IP address of the user if applicable. Otherwise, this variable is blank. |
Device Detect Profile Variables
Device Profile Variables shows the variables