For Step In-Place Editing

To edit a For script step:

  1. Select the step in the Script Steps table.
  2. Edit the step parameters as follows:
    • Session: This column displays no session at all.
    • Return Variable: This step type does not use return variables.
    • Command String: Displays the name of the looping variable and the looping condition.
    • Click into the column and edit in-place the variable name or the looping condition values.

      Alternatively, click the button displaying a drop-down pane and specify the following parameters:

      • Assign to variable: Defines the loop variable name.
      • Loop type: Defines the loop type as either of the following:
      • Counter: When this type is selected, the variable takes an initial value and loops until the incremented variable reaches an end value.

        Set: When this type is selected, the variable cycles through the discrete values of a set.

      • Count from, Count to, Step size: These parameters that are valid only for the Counter loop type represent the variable start, final, and step value. Parameters can be defined using either numeric values or TestComposer variables.

      If the value of the Count to parameter is lower than that of the Count from parameter, the increment is considered to have a negative value and the loop executes with a decrementing loop variable.

    • Values: This parameters that is valid only for the Set loop type represents the set values that the variable takes.

Examples:

  For $count in (1,3,1) //counter loop
    RunProcedure (P1)
 EndFor
 StartSession session1 Telnet,10.205.19.237,23
 For $interface in {"eth0", "eth1", "eth3"} //set loop
    Execute session1 show interface $interface
 EndFor