Configuration Guide Vol. 1


21.1.1 Overview

A high-performance script is a function that enables the configuration and operation of the Switch to be programmed within the Switch. This function can be applied to the following applications.

The following figure shows the main features that make up the advanced script and their relevance.

Figure 21-1: Main functions that make up a high-performance script

[Figure Data]

<Structure of this section>

(1) Script language execution function

Scripts are programs for the configuration and operation procedures of the Switch. The script language execution function executes the created script.

The Switch uses Python for scripting. Python has the following characteristics:

(2) Script action function

The script action function executes actions such as executing commands to the Switch from scripts. The following actions are available:

The following table describes the script actions that can be executed by an extended library specific to the Switch.

Table 21-1: List of extended library script actions specific to the Switch

Action

Description

By executing a command

Executes the command specified in the script.

Operation message output

Outputs the specified arbitrary character string as an operation message.

(3) Event monitoring function

The event monitor function monitors the status of the device and network. Notifies the following scripts and applets when a monitored state change (event) occurs. The notification destination varies depending on the registration method of the monitoring event.

The following table lists the monitoring events.

Table 21-2: List of monitoring events

Monitoring event

Description

Operational message monitoring

Monitors the output operation messages.

Timer monitoring

The timer is used to monitor a predetermined time.

Timers can specify the time in two formats:

  • Specify the interval. (interval timer)

  • Specify time (cron timer)

(4) Applet function

The applet function is a function to execute a previously registered action when an event occurs in cooperation with the event monitoring function.

Monitor events and actions are registered in the configuration. Note that the only supported action is to start the script file (event startup script).

(5) How to use advanced scripts

To use a high-performance script, first create the configuration and operation of the Switch as a script. At this time, you can freely combine the script action function, event monitoring function, and applet function.

When the script is executed with the script language execution function, each process described in the script is executed. In this way, you can use advanced scripts to program and execute the configuration and operation of the Switch.