Loads (plays back) an ASCII-formatted configuration file or a user-written script file on the switch.
filename | Specifies the user-defined name of the ASCII-formatted configuration file or a user-written script file. The script file is known as the XOS script file and uses the .xsf or .py file extension. |
arg | Specifies up to nine variable values that can be specified by the user. The variables are created with the names CLI.ARGV1, CLI.ARGV2, ... CLIARGV9. |
N/A.
Use this command to load an ASCII-formatted configuration file or a user-written script file.
Configuration File: After downloading the configuration file from the TFTP server, this command loads and restores the ASCII-formatted configuration file to the switch.
An ASCII-formatted configuration file uses the .xsf file extension, not the .cfg file extension. The .xsf file extension (known as the XOS script file) saves the XML-based configuration in an ASCII format readable by a text editor.
For more detailed information about the ASCII configuration file, including the steps involved to upload, download, and save the configuration, see the upload configuration [hostname | ipaddress] filename {vr vr-name} command.
User-Written Script File: After writing a script, this command executes the script and passes arguments to it. As with the configuration files, these files use the .xsf or .py file extension that is automatically added.
The command allows up to nine optional variable values to be passed to the script. These are created with the names CLI.ARGV1, CLI.ARGV2, CLI.ARGV3, ... CLI.ARGV9.
In addition, two other variables are always created. CLI.ARGC gives the count of the number of parameters passed, and CLI.ARGV0 contains the name of the script that is being executed.
To check the variable values use the command, show var.
Note
Only the .xsf and .py extensions are used. The load script command assumes a .py or .xsf extension and retries opening the file if the file cannot be found with the original specified name or no extension is provided.The following command loads the ASCII-formatted configuration named configbackup.xsf:
load script configbackup.xsf
After issuing this command, the ASCII configuration quickly scrolls across the screen. The following is an example of the type of information displayed when loading the ASCII configuration file:
script.meg_upload_config1.xsf.389 # enable snmp access script.meg_upload_config1.xsf.390 # enable snmp traps script.meg_upload_config1.xsf.391 # configure mstp region purple script.meg_upload_config1.xsf.392 # configure mstp revision 3 script.meg_upload_config1.xsf.393 # configure mstp format 0 script.meg_upload_config1.xsf.394 # create stpd s0
ExtremeXOS 15.6 provided capability for Python scripting. Current Python scripting implementation allows a script to interact directly with the CLI inteface for managing ExtremeXOS functionality. Python script files end in .py. The .py suffix on the script file name tells the load script command to use the Python interpreter to process the script file. Additionally, ExtremeXOS 15.6 introduced a synonym command: run script. This command functions exactly as load script.
This command was first available in ExtremeXOS 11.4.
Multiple arguments for user-written scripts were added in ExtremeXOS 12.1.
Scripting support for Python was added in ExtremeXOS 15.6.
This command is available on ExtremeSwitching X435, X440-G2, X450-G2, X460-G2, X465, X590, X620, X690, and X695 series switches.