Creating Scripts

This chapter describes the scripting functionality built into ExtremeCloud IQ Site Engine and describes how to use ExtremeCloud IQ Site Engine to create scripts.

ExtremeCloud IQ Site Engine Scripts Overview

ExtremeCloud IQ Site Engine scripts are files containing CLI commands, control structures, and data manipulation functions. ExtremeCloud IQ Site Engine scripts can be executed on one or more devices or ports: simultaneously on multiple devices or ports, or on one device or port at a time.

ExtremeCloud IQ Site Engine allows you to create ExtremeCloud IQ Site Engine tasks, which run a script on specified devices or ports at specified times, either on a one-time or recurring basis. Tasks execute the script according to a schedule you configure.

In general, ExtremeCloud IQ Site Engine scripts support syntax and constructs from the following sources:

  • Python scripting language — Create scripts using the Python syntax. The script can access ExtremeCloud IQ Site Engine data through API and NBI calls, and can use variables from the Custom Variables tab. Python scripts can be saved as tasks, and then run from the Tasks menu or run as scheduled tasks.

    To execute a Python script on a device using an ExtremeXOS/Switch Engine operating system, use Type= JSON-RPC-Python. For other device operating systems, use Type=Python.
  • TCL scripting language version 8.1 — Create scripts using TCL syntax. The script can send CLI commands to devices in ExtremeCloud IQ Site Engine and the resulting responses can be use by the script in ExtremeCloud IQ Site Engine. TCL scripts can be saved as tasks, and then run from the Tasks menu or run as scheduled tasks.

    To execute TCL scripts on a device using an ExtremeXOS/Switch Engine operating system, abbreviated commands (such as sh vlan instead of show vlan) can be used in the script if the commands use the prefix CLI.

    Example: CLI sh vlan

    To copy the whole script to an ExtremeXOS/Switch Engine device, use Type=JSON-RPC-CLI, the script will be executed in the enable cli scripting session. For other device operating systems, use Type=TCL.

    For general information about the TCL scripting language, see www.tcl.tk. For more information about using CLI scripting, see the ExtremeXOS/Switch Engine User Guide.
  • ExtremeXOS/Switch Engine CLI commandsExtremeXOS/Switch Engine CLI commands can be combined into a script to execute in sequence using Type=CLI. The CLI script is saved and executed in the Scripts tab. However, if the sequence of command needs to be accessed or scheduled as a task, then Type=TCL should be used as the script type instead. An ExtremeCloud IQ Site Engine script is sent to the device or port and the response can be used by the script.

    CLI commands can also be executed for selected devices using the CLI Commands feature on the Tasks menu for devices. The commands are executed sequentially and can be saved to a script but not saved to a task.

    Abbreviated ExtremeXOS/Switch Engine commands do not work unless you prefix the shortened command with CLI. For example, to abbreviate show vlan, type CLI sh vlan.

Bundled ExtremeCloud IQ Site Engine Scripts

ExtremeCloud IQ Site Engine includes a number of sample scripts you can use as templates for your own ExtremeCloud IQ Site Engine scripts. These scripts perform such tasks as enable/disable ports, apply ACLs, restart engines, and configure VLANs.

The sample scripts included with ExtremeCloud IQ Site Engine are available to users with an Administrator role. The XML source files for the scripts are located at <install directory>\appdata\scripting\bundled_scripts.

The ExtremeCloud IQ Site Engine Script Interface

To display the scripts configured in ExtremeCloud IQ Site Engine, select the Tasks tab, then select the Scripts tab.

The Scripts tab contains the following information:

  • Script Type — The language in which the script is written.
  • Name — The name of the script. The script Name is defined when adding the script and can not be edited.
  • Category — The script category, if configured.
  • Saved Tasks — Indicates whether the script is configured as a saved task and is available on the Saved Tasks tab.
  • Workflow — Indicates if the script is included in a workflow.
  • Modified By — The name of the last user to modify the script. System scripts that are packaged with ExtremeCloud IQ Site Engine are indicated as system.
  • Comments — Comments or a description of the script.
  • Modified Date/Time — The date and time the script was last modified.

To view a script, double-click it. Note: Systems scripts cannot be edited. However, system scripts can be duplicated (using Save As ) and the duplicated script can be edited. The duplicated script shows the last user to edit the script in the Modified By field.

The ExtremeCloud IQ Site Engine Edit Script window allows you to add content to a script, set values for parameters, specify run time settings, and specify the ExtremeCloud IQ Site Engine users with permission to run the script.

Depending on the type of script you are editing, the following tabs may appear in the ExtremeCloud IQ Site Engine Script Editor window:

  • Overview — Displays fields to enter script parameters. The contents of this tab are derived from the metadata specified in the script.
  • Content — Displays the script in a text editor window, where you can modify it directly.
  • Description — Contains descriptive information about the script. The script description is specified in the metadata section of the script.
  • Runtime Settings — Specifies script settings applied when the script is run.
  • Permissions and Menus — Specifies ExtremeCloud IQ Site Engine user roles with the ability to run the script, and whether or not, and where, the option to run the script appears in the ExtremeCloud IQ Site Engine interface, such as on a menu or in a shortcut menu.
  • Network OS — Allows you to select the Network Operating Systems that support the script. The script is available on a device's Tasks submenu when the device's Network OS matches one of the Network Operating Systems defined for the script.

Managing ExtremeCloud IQ Site Engine Scripts

With scripting, you can:

Create an ExtremeCloud IQ Site Engine Script

  1. Select Scripts on the Tasks tab.
  2. Select the Add button.
  3. Select the type of script you are creating:
    • TCL — A Tool Command Language script. Use TCL instead of CLI if you need to use the script in a task. Proceed to step 5.
    • Python — A Python script. Proceed to step 5.
    • JSON-RPC-Python — Machine to Machine Interface (used to send a Python script to an ExtremeXOS/Switch Engine device). Proceed to step 5.
    • JSON-RPC-CLI — Machine to Machine Interface (used to send CLI commands to an ExtremeXOS/Switch Engine device). Proceed to step 5.
    • CLI — A CLI command script. Use CLI instead of TCL if you do not need to use the script in a task. Proceed to step 4.
  4. When selecting CLI from the Add drop-down list, the Add Script window opens, where you can enter the CLI commands for the script. Select Variables to open the Select Variables window, from which you can select variables you define on the Custom Variables tab.



    Use the Scope drop-down list to select either All, Custom, or System from the drop-down list, depending on how you configured the variable you are inserting. Select Insert to add the variable to your script.

    Select Save to save the CLI script on the Scripts tab or select Save As to save the script to the ExtremeCloud IQ Site Engine server.

    Select Run to run the CLI script immediately.
  5. When selecting the TCL, Python, JSON-RPC-Python, and JSON-RPC-CLI script types, the Add Script window also opens, but contains the following tabs:
    • Overview — Use to enter script parameters. The contents of this tab are derived from the metadata specified in the script.
    • Content — Use to modify the script directly in a text editor window.
    • Description — Add descriptive information about the script. The script description is specified in the metadata section of the script.
    • Runtime Settings — Specify script settings applied when the script is run.
    • Permissions and Menus — Specify ExtremeCloud IQ Site Engine user roles with the ability to run the script, and whether or not, and where, the option to run the script appears in the ExtremeCloud IQ Site Engine interface, such as on a menu or in a shortcut menu.
    • Select the Network OS tab to select the select the Network Operating Systems that support the script.
    •   NOTE: Select Unknown when creating scripts or workflows that include devices before their Network OS has been determined (e.g. onboarding new devices).

  1. Type the metadata tags #@DetailDescriptionStart and #@DetailDescriptionEnd between the tags #@MetaDataStart and #@MetaDataEnd, and then type a detailed description between these detailed description tags. This description appears on the Description tab.
  2. Place variable definition statements in the metadata section (between #@MetaDataStart and #@MetaDataEnd tags).

    Select a variable by expanding the Variables menu on the left of the Content tab. A list of system variables appears under Variables. To add a variable to the script, double-click the variable.
  3. Enter script commands after the metadata section of the script.

    The following are examples of types of script commands supported in ExtremeCloud IQ Site Engine:
    • ExtremeXOS/Switch Engine 12.1 and later CLI scripting commands
    • TCL commands
    • Constructs
  4. Select the Runtime Settings tab to specify runtime settings.
  5. Select the Permissions And Menus tab to specify which ExtremeCloud IQ Site Engine user roles have permission to run the script, and whether or not, and where, the script appears in the menu or in a shortcut menu.
  6. Select the Network OS tab to select the select the Network Operating Systems that support the script.
  7.   NOTE: Select Unknown when creating scripts or workflows that include devices before their Network OS has been determined (e.g. onboarding new devices).
  8. Select Save. The Save Script window appears.

  1. Type a name for the script file in the Name field and a comment about the script in the Comment field, if necessary.
  2. Select Save.
  3. Select Run to run the script now or Cancel to run the script at a later time.

Specify Runtime Settings for a Script

To specify the runtime settings for a script, select the Runtime Settings tab.

Use this tab to specify the following settings:

  • Script Comments — Use this field to enter comments or a description of the script.
  • Timeout if script is not completed on each device (in seconds) — Select the maximum length of time the script runs on each device or port (in seconds) before the process ends. This timeout value applies to each device or port independently.

Specify Permissions and Run Locations for Scripts

Specify which ExtremeCloud IQ Site Engine user roles have permission to run the script, and whether or not, and where, the script appears in the menu or in a shortcut menu.

Select the Permissions and Menus tab to set permissions and menu locations for the script.

Authorization Group (Roles)
Select the Authorization Group credentials required to execute the script from the drop-down list.
Category
Select the Category group from the drop-down list, which defines the Tasks submenu in which the script is grouped throughout ExtremeCloud IQ Site Engine. The default category is Example.
Menus
Select the Tasks submenus in ExtremeCloud IQ Site Engine in which you want the script to display from the drop-down list. Select Multi-Device for User Device Group scripts.
Groups
Select the Select Groups to select the device groups on which the script displays.
Selected Groups
Displays the Groups in which the script is included.

Specify Network Operating System

Select the Network OS tab to select the Network Operating Systems that support the script.

  NOTE: Select Unknown when creating scripts or workflows that include devices before their Network OS has been determined (e.g. onboarding new devices).

Run a Script

From the Network tab
  NOTE: The Runtime Settings tab is unavailable for scripts run via the Network tab. To save a script as a saved task or configure a timeout when running the script, run the script via the Tasks tab.
  1. Right-click the device in the Devices table or in the Device Groups left-hand panel on the Devices tab.
  2. Select a script in the Tasks menu. The Run Script window opens.
  3. On the Device Selection tab, select the device or devices against which you want to run the script. Use the arrows to add/remove devices and to control the order of the selected devices.
  4. Select Next.
  5. On the Overview tab of the Device Settings tab, set the configuration properties for the script. The options available on this tab vary depending on the script selected. If desired, select the Description tab to view the description defined for the script.
  6. Select Next.

    The Verify Run Script tab opens.
  7. Verify your script selections, and then select Run.
  8. On the Results tab, you see the results of the script including any errors.
  9. Select Close.
From the Tasks tab
  1. Select Scripts.
  2. On the Scripts tab, find the script in the list. If needed, filter the list by typing search terms in the Search field.
  3. Select the script by selecting its row and then select Run. The Run Script window opens.
  NOTE: Only select one script. The Run button is unavailable if two or more scripts are selected.
  1. On the Device Selection tab, shown below, select the device or devices against which you want to run the script. Use the arrows to add/remove devices and to control the order of the selected devices.

  1. Select Next.

  2. On the Overview tab of the Device Settings tab, set the configuration properties for the script. The options available on this tab vary depending on the script selected. If desired, select the Description tab to view the description defined for the script.
  3. Select Next.
  4. On the Runtime Settings tab, configure the runtime settings for the script.
    • Timeout if script is not completed on each device (in seconds) — Use to set a maximum amount of time for the script to run on each device (in seconds). This timeout value applies to each device independently.
    • Run now, don’t save as task — Select to run the script immediately without saving the script as a task.
    • Save as a task and run now — Select to run the script immediately and save it as a task on the Saved Tasks tab. Type a name for the task in the Task Name field.
    • Save as a task. I’ll run later — Select to save the script as a task you can run later. Type a name for the task in the Task Name field. The task appears on the Saved Tasks tab.
  5. Select Next. On the Verify Run Script tab, verify your script selections, and then select Run.
  6. On the Results tab, you see the results of the script including any errors.
  7. Select Close.

View Script Results

When a script is run, results are stored in the <install directory>/appdata/scripting/tmp folder. The folder in which script results are stored cannot be configured.

An event is stored in the console.log file in the <install directory>/appdata/logs folder each time a script is executed. The event in the log contains the location of the audit file. These audit logs reside in the tmp directory and remain for two weeks (per user), or until the next server restart, whichever comes first. The number of audit files written to the folder is limited to 1,000 files. When the number of files exceeds 1,000, the oldest 100 are deleted.

Edit a Script

To edit a script:

  1. In the Tasks tab, select Scripts.
  2. In the scripts table, select the script you want to edit. Note: Systems scripts that are packaged with ExtremeCloud IQ Site Engine cannot be edited. However, system scripts can be duplicated (using Save As) and the duplicated script can be edited. The systems scripts are labeled system in the Modified By field, but duplicated scripts show the last user name as Modified By.
  3. Select the Edit button. The script opens in the Edit Script window, where you can edit the script.
  4. Save the script:
    1. Select the Save button to save your changes to the script.
    2. Select Save As to save a copy of this script with a new name.

      The Save Script As window appears.

      1. Type a name for the script file in the Name field and a comment about the script in the Comment field, if necessary.
      2. Select Save.

The script is saved.

Delete a Script

To delete a script:

  1. In the Tasks tab, select Scripts.
  2. In the scripts table, select one or more scripts you want to delete.
  3. Select the Delete button.
  4. Select Yes to confirm the script deletion.

Import Scripts into ExtremeCloud IQ Site Engine

Import XML-formatted scripts into ExtremeCloud IQ Site Engine.

To import a script:

  1. In the Tasks tab, select Scripts.
  2. Select the Import button.

  1. Select Select File to navigate to the location of the script. The script appears in the grid.
  2. Enter a new Script Name in the Override Script Name (optional) field if you want to change the name of the script.
  3. Select the Overwrite existing scripts checkbox, if necessary.
    • When Overwrite existing scripts is not selected and the script name displayed in the File Name field (if you did not use the Override Script Name (optional) field) or the Override Script Name (optional) field matches the name of a script in ExtremeCloud IQ Site Engine, the new script is not imported.
    • When Overwrite existing scripts is selected and the script name displayed in the File Name field (if you did not use the Override Script Name (optional) field) or the Override Script Name (optional) field matches the name of a script in ExtremeCloud IQ Site Engine, the new script is imported and overwrites the existing script.
  4. Select Import.
  5. Verify the script is imported and select Close.
  NOTE: Exported EPICenter 6.0 telnet macros cannot be imported as XML scripts.

Export a Script

To export a script:

  1. From the Tasks tab, select a script.

  2. Select the Export button.

The script is exported in XML format to your browser download directory.

Save Script as a Task

When you run a script, you can save it as a task that appears in the Saved Tasks tab. This saves your device selections and runtime settings, and then allows you to manually run the script task at a later time or schedule it to run in the future either one time, or on a regular basis.

To save a script as a saved task:

  1. Select a script.
  2. Run the script and designate it as a task by selecting either Save as a task and run now or Save as task. I’ll run later on the Runtime Settings tab.
  3. Enter a new name for the task in the Task Name field.

ExtremeCloud IQ Site Engine saves the script to the Saved Tasks tab.

ExtremeCloud IQ Site Engine Script Reference

This section contains reference information for ExtremeCloud IQ Site Engine scripts. It contains the following topics:

An ExtremeCloud IQ Site Engine script may contain a metadata section, which can serve as a usability aid in the script interface. The metadata section, if present, is the first section of an ExtremeCloud IQ Site Engine script, followed by the script logic section, which contains the CLI commands and control structures in the script. The metadata section is delimited between #@MetaDataStart and #@MetaDataEnd tags. A metadata section is optional in an ExtremeCloud IQ Site Engine script.

Use metadata tags to specify the description of the script, as well as parameters that the script user can input. The information specified by the metadata tags appears in the Overview tab for the script.

ExtremeCloud IQ Site Engine-Specific Python Scripting Constructs

Specifying the Wait Time Between Commands

After the script executes a command, the time.sleep command causes the script to wait a specified number of seconds before executing the next statement.

Syntax

time.sleep(10)

Example

# sleep for 10 seconds after executing a command

time.sleep(10)

Metadata Tags

#@MetaDataStart and #@MetaDataEnd

Indicates the beginning and end of the metadata section of the script. In order for description information and variable input fields to appear in the Overview tab for a script, the corresponding metadata tags must appear in the metadata section.

Example

#@MetaDataStart

#@SectionStart (description = "Protocol Configuration Section") Set var protocolSelection eaps

#@SectionEnd

#@SectionStart (description = "vlan tag section") Set var vlanTag 100

#@MetaDataEnd

#@ScriptDescription

Specifies a one-line description of the script. The description specified with this tag cannot contain a newline character.

Example

#@ScriptDescription "This is a VLAN configuration script."

#@DetailDescriptionStart and #@DetailDescriptionEnd

Specifies the beginning and end of the detailed description of the script. The detailed description can be multiple lines or multiple paragraphs. The detailed description is shown in the Script View tab in the script editor window.

Example

#@DetailDescriptionStart

#This script performs configuration upload from ExtremeCloud IQ Site Engine to the switch.

#The script only supports tftp.

#This script does not support third party devices.

#@DetailDescriptionEnd

#@SectionStart and #@SectionEnd

Specifies the beginning and end of a section within the metadata part of a script. You do not need to end with a #@MetaDataEnd tag, then the #@SectionEnd tag if this is the last section of the metadata. When a section starts with the #@SectionStart tag, the previous section automatically ends.

Example

#@SectionStart (description = "Protocol Configuration Section") Set var protocolSelection eaps

#@SectionEnd

#@VariableFieldLabel

Defines user-input variables for the script. For each variable defined with the #@VariableFieldLabel tag, you specify the variable’s description, scope, type, and whether it is required.

Description

Label that appears as the prompt for this parameter in the Overview tab.

Scope

Whether the parameter is global (uses the same value for all devices) or device-specific. Valid values: global, device. Default value is global.

Type

Parameter data type. This determines how the parameter input field is shown in the Overview tab. Valid value: String (the parameter input field on the Overview tab displays as a drop-down list if validValues are listed or as a text field if validValues are not listed).

readonly

Whether the parameter is read-only and cannot be modified by the user. Valid values: Yes, No. Default value is No.

validValues

Lists all possible values for a parameter. Separate each value using a comma and put into a square bracket.

Required

Indicates whether specifying the parameter is required to run the script. Valid values: Yes, No.

Example

#@VariableFieldLabel (description = "Partition:", scope = global,

#required = yes, validValue = [Primary,Secondary], readOnly=false)

set var partition ""

ExtremeCloud IQ Site Engine-Specific TCL Scripting Constructs

This section describes the TCL scripting constructs specific to ExtremeCloud IQ Site Engine:

Specifying the Wait Time Between Commands

After the script executes a command, the sleep command causes the script to wait a specified number of seconds before executing the next statement.

Syntax

sleep 5

Example

# sleep for 5 seconds after executing a command

sleep 5

Printing System Variables

The printSystemVariables command prints the current values of the system variables. Specifically, values for the following variables are printed:

  • deviceIP
  • deviceName
  • serverName
  • deviceSoftwareVer
  • serverIP
  • serverPort
  • date
  • time
  • abort_on_error
  • CLI.OUT

Syntax

printSystemVariables

Example

# Display values for system variables

printSystemVariables

Configuring a Carriage Return Prompt Response

A special string within the script, <cr>, indicates a carriage return in response to a prompt for a command.

Syntax

<cr>

Example

# cancel download

download image 10.22.22.22 t.txt <cr>

Synchronizing the Device with ExtremeCloud IQ Site Engine

The PerformSync command manually initiates a synchronization for specified ExtremeCloud IQ Site Engine feature areas and scope.

Syntax

PerformSync [-device <ALL | deviceIp>] [-scope <EAPSDomain | VPLS> ]

If -device is not specified, the current device (indicated by the $deviceIP system variable) is assumed.

The PerformSync command is executed in an asynchronous manner so when the command is executed, ExtremeCloud IQ Site Engine moves on to the next command in the script without waiting for the PerformSync command to complete.

Examples

PerformSync -scope VPLS

Printing a String to the Output File

Example

# Write Device IP address to file

ECHO "device ip is $deviceIP"

  NOTE: The TCL puts and ECHO commands have the same function. However, the ECHO command is not case-sensitive (unless referenced inside another command), while the puts command is case-sensitive.

 

TCL Support in ExtremeCloud IQ Site Engine Scripts

The following TCL commands are supported in ExtremeCloud IQ Site Engine scripts:

after concat flush info lrange puts set unset
append continue for interp lreplace read split update
array global foreach join lsearch regexp string uplevel
binary eof format lappend lsort regsub subst upvar
break error gets lindex namespace rename switch variable
catch eval history linsert open return tell vwait
clock expr if list package scan time while
close fblocked incr llength proc seek trace  

 

See www.tcl.tk/man/tcl8.2.3/TclCmd/contents.htm for syntax descriptions and usage information for these TCL commands.

Entering Special Characters

In an ExtremeCloud IQ Site Engine script, use the backslash character ( \ ) as the escape character if you need to enter special characters, for example:

  • quotation marks ( “ ” )
  • colon ( : )
  • dollar sign ( $ ).

Example

set var value 100

set var dollar \$value

show var dollar >>> $value

  NOTE: Do not place the backslash character at the end of a line in an ExtremeCloud IQ Site Engine script.

Line Continuation Character

The line continuation character is not supported in ExtremeCloud IQ Site Engine scripts. Place each command statement on a single line.

Case Sensitivity in ExtremeCloud IQ Site Engine Scripts

The commands and constructs in an ExtremeCloud IQ Site Engine script are not case-sensitive. However, if a command is referenced inside another command, the inner command is case-sensitive. In this instance, the inner command case matches how it appears in the ExtremeCloud IQ Site Engine documentation.

Example (Usage of the ExtremeCloud IQ Site Engine command ECHO)

echo hi (valid)

echo [echo hi] (error)

echo [ECHO hi] (valid)

Reserved Words in ExtremeCloud IQ Site Engine Scripts

The following words are reserved by ExtremeCloud IQ Site Engine and cannot be used as variable names in a script:

Also, do not use a period (.) within a variable name, use an underscore ( _ ).

ExtremeXOS/Switch Engine CLI Scripting Commands Supported in ExtremeCloud IQ Site Engine Scripts

ExtremeCloud IQ Site Engine scripts support the CLI commands in this section.

$VAREXISTS
  • Checks if a given variable is initialized.
  • Switch Compatibility — Devices running ExtremeXOS/Switch Engine 12.1 and higher support this command.
  • Example — if ($VAREXISTS(foo)) then show var foo endif
$TCL
  • Evaluates a given TCL command. The following constructs support the $TCL command:
    • set var if
    • while
  • See TCL Support in ExtremeCloud IQ Site Engine Scripts for a list of supported TCL commands.
  • Switch Compatibility — Devices running ExtremeXOS/Switch Engine 11.6 and higher support this command.
  • Example — set var foo $TCL(expr 3+4) if ($TCL(expr 2+2) == 4) then
$UPPERCASE
  • Converts a given string to upper case.
  • The following constructs support the $UPPERCASE command:
    • set var
    • if
    • while
  • Switch Compatibility — Devices running ExtremeXOS/Switch Engine 11.6 and higher support this command.
  NOTE: The $UPPERCASE command is deprecated in ExtremeXOS/Switch Engine 12.1 CLI scripting. Use the $TCL (string toupper <string>) command instead. Example: set var foo $TCL ("foo") .
show var
  • Prints the current value of a specified variable.
  • Switch Compatibility — Devices running ExtremeXOS/Switch Engine 11.6 and higher support this command.
  • Example — show var foo
delete var
  • Deletes a given variable. Only local variables can be deleted; system variables cannot be deleted.
  • Switch Compatibility — Devices running ExtremeXOS/Switch Engine 11.6 and higher support this command.
  • Example — set var foo bar delete var foo if ($VAREXISTS(foo)) then ECHO "this
    should NOT be printed" else ECHO "Variable deleted." endif
configure cli mode scripting abort-on-error
  • Configures the script to halt when an error occurs. If there is a syntax error in the script constructs (set var / if ..then / do..while ), execution stops even if the abort_on_error flag is not configured.
  • Switch Compatibility — Devices running ExtremeXOS/Switch Engine 11.6 and higher support this command.
  • Example — enable cli scripting \$UPPERCASE uppercase # should not print show var
    abort_on_error

ExtremeCloud IQ Site Engine-Specific System Variables

The following system variables can be set in ExtremeCloud IQ Site Engine scripts:

$abort_on_error

Whether the script terminates if a CLI error occurs: 1 aborts on error; 0 continues on error.

$CLI.OUT

The output of the last CLI command.

$CLI.SESSION_TYPE

The type of session for the connection to the device, either Telnet or SSH.

  NOTE: Variables with TCL special characters must be enclosed in braces. For example, when using the system variables $CLI.SESSION_TYPE and $CLI.OUT in a script, they must be entered as ${CLI.SESSION_TYPE} and ${CLI.OUT}, respectively.

$date

The current date on the ExtremeCloud IQ Site Engine server.

$deviceIP

The IP address of the selected device.

$deviceLogin

The name of the login user for the selected device.

$deviceName

The DNS name of the selected device.

$deviceSoftwareVer

The version of ExtremeXOS/Switch Engine running on the selected device.

$deviceType

The product type of the selected device.

$netsightUser

The name of the ExtremeCloud IQ Site Engine user running the script.

$isExos

Indicates whether the device is an ExtremeXOS/Switch Engine device. Possible values are True or False.

$port

Selected port numbers, represented as a string. If the script is not associated with a port, this system variable is not supported.

$serverIP

The IP address of the ExtremeCloud IQ Site Engine server.

$serverName

The host name of the ExtremeCloud IQ Site Engine server.

$serverPort

The port number used by the ExtremeCloud IQ Site Engine web server; for example, 8080.

$STATUS

The execution status of the previously executed ExtremeXOS/Switch Engine command: 0 if the command executed successfully; non-zero otherwise.

$time

The current time on the ExtremeCloud IQ Site Engine server.

$vendor

Vendor name of the device; for example, Extreme.

Top