Top
ServerView Resource Orchestrator Cloud Edition V3.3.0 Design Guide
FUJITSU Software

F.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 "F.4.1 Function and Attributes of Each File".

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

Basic Structure Example when Using Scripts for L-Platform Templates (Automatic Configuration)

Figure F.1 Basic Structure Example when Using Scripts for L-Platform Templates (Automatic Configuration)

Note: Select a network device (firewall or server load balancer) that is registered in a network pool which tenant administrators or tenant users can use.

Script A

The infrastructure administrator prepares the script.
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 B

The infrastructure administrator prepares the script.
The example of the basic processing in the script is the same as for script A.

Script List (xxx.lst)

The infrastructure administrator prepares the script.
The script list of the ruleset selected when creating the L-Platform.
Scripts specified in the script list are executed in order.

Parameter File (default_param.prm)

The infrastructure administrator prepares the script.
Information for setting or changing specified parameter values when tenant administrators or users create or modify L-Platforms.

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.

Interface Configuration File (Unm_network_setting.xml)

The infrastructure administrator prepares the script.
Prepare one script per system.

Basic Structure for Network Resources

Figure F.2 Basic Structure for Network Resources

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

Script A

This script is 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 B

This script is prepared by the infrastructure administrator and registered under a specific network device ruleset folder.
The example of the basic processing in the script is the same as for script A.

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.

Basic Structure of an L-Platform Template (Operation)

Figure F.3 Basic Structure of an L-Platform Template (Operation)

Note: Select a network device (server load balancer) that is registered in a network pool which the tenant administrators or tenant users creating the L-Platform can use.

Script A

The infrastructure administrator prepares the script.
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]
      Obtains command execution results and writes them to the standard output

    • If command files do not exist

      Execute the process of sending and receiving commands. [Command transmission]
      Obtains command execution results and writes them to the standard output

  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 B

The infrastructure administrator prepares the script.
The example of the basic processing in the script is the same as for script A.

Script List (xxx.lst)

The infrastructure administrator prepares the script.
Script list of the ruleset selected when creating the L-Platform.
Scripts specified in the script list are executed in order.

Parameter File (default_param.prm)

The infrastructure administrator prepares the script.
Information for setting specified parameter values when tenant administrators or users operate an L-Platform.

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.


Note that each file needs to be created according to the script to be used.
The example of basic structure is the explanation of the structure corresponding to the sample scripts provided with this product.