Top
ServerView Resource Orchestrator V3.4.0 Automatic Quarantining Function User's Guide
FUJITSU Software

D.4 Basic Script Structure

This section explains the basic operation and structure of a script used for automatic configuration and operation of network devices.

The basic flow of configuration and operation of network devices using scripts is as follows:

  1. Confirm the syntax of the script list file.
  2. The following is processed starting from the start of the script list file.
    1. Specify the target network device.
    2. Complete the script file to convert variable information in the script file corresponding to "Script Name" with the information of the parameter file.
    3. When "cmd operand" is specified in a script list, complete the specified command file. In this process, variable information in the command file is converted using the information of parameter files.
    4. Script files are executed sequentially, from top to bottom.

      At this time, if necessary, commands are loaded from the command file.

For the function of each file, refer to "D.4.1 Function and Attributes of Each File".

As examples of basic script structure, the following basic structures are shown.

Basic Structure for Network Resources

Figure D.1 Basic Structure for Network Resources
Basic Structure for Network Resources

Note: It is possible to specify parameters in a script without a parameter file.

Scripts A, B

These scripts are prepared by the infrastructure administrator and registered under a specific network device ruleset folder.

An example of the basic process in a script is as follows:

  1. Define variables
  2. Establish a telnet/ssh connection with the variable (IP address in admin LAN)
  3. Send the variable (login account 1)
  4. Send the variable (login password 1)
  5. Process the command file
    • If command files exist

      Read the command file and send the content of the command file line by line. [Command transmission]

    • If command files do not exist

      Execute the process of sending and receiving commands. [Command transmission]

  6. Command processing ends.
    • If command processing ends normally

      Set [Normal] for the return value.

    • If command processing ends abnormally

      Set [Abnormal] for the return value.

  7. Send the variable (logout character string). [Command transmission]
  8. Disconnect the telnet/ssh connection.
Script List (xxx.lst)

This script is prepared by the infrastructure administrator and registered under a specific network device ruleset folder.

For network devices related to the operated L-Platform.

Scripts specified in the script list are executed in order.

Parameter File (Any_Name.prm)

The infrastructure administrator prepares this if necessary.

Command File (Any_Name.cli)

The infrastructure administrator prepares the script.

Define processes for after log in to devices with log in accounts, excluding command processes included in scripts.