Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Creating an Operation

Junos Space Network Management Platform enables you to create operations that combine multiple scripts and image tasks, such as deploying images and staging or executing scripts, into a single operation for efficient use and reuse. An operation can also contain other existing operations, as well as tasks for Junos Continuity software packages (JAM packages).

Note:

An operation can contain any number of scripts and operations, but only one device image.

To create an operation:

  1. On the Junos Space Platform UI, select Images and Scripts > Operations.

    The Operations page appears.

  2. Click the Create Operation icon.

    The Create Operation dialog box appears.

  3. In the Name text box, type a name for the operation.

    The operation name cannot exceed 32 characters. The name can contain only letters and numbers and can include a hyphen (-), underscore (_), or period (.). The name cannot start with a space.

  4. In the Description text box, type a description for the operation.

    The operation description cannot exceed 256 characters. The description can contain only letters and numbers and can include a hyphen (-), underscore (_), period (.), or comma (,).

  5. Select the Mark as important check box to mark this operation as important.
  6. Click the Add icon, and select Script, Image, or Operation from the list.

    The Select Scripts, Select Images, or Select Operations dialog box appears depending on what you selected and displays all the Junos Space Platform scripts, images, and operations, respectively, that you can include in the operation.

    • To add a script, click the Add icon, and select Script from the list.

      The Select Scripts page appears. This page displays all the available scripts on the Junos Space Platform. To search for a specific script, you can enter the search criteria in the Search field on the top right of this page. To clear the search results, click the x icon next to the search criteria.

      To select the scripts:

      1. Select the scripts and click Add to add your selections to the list.

        You are returned to the Create Operation dialog box.

      2. Click the Edit icon next to the script to specify:

        • The action that should be performed. The action can be Stage (default), Execute, or Remove.

          Note:

          The Remove action is supported only from Junos Space Network Management Platform Release 15.2R1 onward.

        • The version of the script to be associated with the operation. If you have opted to stage or execute the script, you can select the version of the script to be staged or executed. By default, the latest version is selected. To change the version, select the required version of the script from the Version list. If you are executing the script as part of the operation, select the version that you have staged; else, Junos Space Platform displays an error message when you run the operation.

        • Whether the script must be enabled or not. If you have opted to stage or execute the script, you can choose to keep the script enabled on the device or devices. Keep the Enable Script check box selected if you want the scripts to be enabled and ready to be executed when you stage them from Junos Space Platform. Clear this check box if you want the scripts to be disabled on the devices. However, before you run the operation, make sure that the scripts are enabled; else, Junos Space Platform displays an error message.

        • The Script Return Code. If you have opted to execute the script, then you can configure the script return code, which indicates whether the script execution was a success or failure. Junos Space Platform, by default, returns “Success” when it is able to execute a script successfully. However, you may want to consider the script execution to be a success or a failure only if a specific pattern string is present in the script execution results. You can specify this pattern string in the Set value field. This field supports up to a maximum of 255 characters.

          For example, consider you are running a script to verify whether all the interfaces on a device are up. Though the script might execute successfully, you may want to show this script execution as a failure if an interface is down. To achieve this, you can search for the string “down” in the script execution results using the following steps:

          In the Set Return Code section:

          1. Select Failure.

          2. In the Set value field, type down.

        • Whether the script-device association must be forcibly removed or not. If you have opted to remove the script, you can select the Force Remove check box to make sure that the script-device association is removed from Junos Space Platform, irrespective of whether the script is removed successfully or not.

          When you select the Remove option and the script is staged and enabled on the device, Junos Space Platform disables the script on the device, removes the script from the device, and then removes the script-device association. If the script is staged on the device and not enabled, Junos Space Platform removes the script from the device and then removes the script-device association.

          If Junos Space Platform encounters a problem, such as loss of device connectivity, when the script is being disabled or removed, the script-device association might not be removed. To ensure that the script-device association is removed, you must select the Force Remove check box.

      3. Click Save to save the configuration changes to the script.

    • To add a device image or a Junos Continuity software package, click the Add icon, and select Image from the list. The Select Device Image page appears. This page displays all the images available in Junos Space Platform. To search for a specific image, you can enter the search criteria in the Search field on the top right of this page. To clear the search results, click the x icon next to the search criteria.

      Note:

      You can select Junos Continuity software packages by following the procedure for selecting device images.

      To select the device images:

      1. Select the images and click Add to add your selections to the list.

        You are returned to the Create Operation dialog box.

      2. Click the Edit icon next to the image to specify the action that must be performed. The action can be Stage, Deploy, or Undeploy.

        Note:
        • The Undeploy option appears only if you have selected a Junos Continuity software package to be added. The Undeploy option does not appear in the case of other device images.

        • The deployment options that are displayed for Junos Continuity software packages and for device images are different. For more information about specifying deployment options, see Deploying Device Images.

    • To add an operation, click the Add icon, and select Operation from the list. The Select Operations page appears. This page displays all the available operations on the Junos Space Network Management Platform. To search for a specific operation, you can enter the search criteria in the Search field on the top right of this page. To clear the search results, click the X icon next to the search criteria.

      To select the operations:

      1. Select the operations on the Select Operations page.

      2. Click Add to add your selections to the list.

        You are returned to the Create Operation dialog box.

      Note:

      You cannot edit the child operation from the Create Operation dialog box.

  7. You can modify the list of selected scripts, images, and operations by using the icons described in Table 1.
    Table 1: Create Operation Dialog Box Icon Descriptions

    Icon

    Description

    Add scripts, image, and operations to the list.

    Delete the selected script, image, or operation from the list.

    Move the selected script, image, or operation to the row above.

    Move the selected script, image, or operation to the row below.

    Make a copy of the selected script, image, or operation, and include it in the operation.

    Edit the options for deploying or executing the scripts or images in the operation. For scripts, you can edit the action type, script parameters, and their values (success or failure). For images, you can edit the action type and the image staging and deployment options. See Deploying Device Images for more information.

    Note:

    You cannot edit a child operation.

  8. Click Create to create the operation.

    You are returned to the Operations page. If the operation is successfully created, then you can view the newly added operation on this page. An operation that is marked important appears with a star next to it indicating that this operation takes priority over others (the star appears in the Priority column on the Operations page).

    You can verify whether the operation is created with your specifications by double-clicking the operation and viewing its details.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
15.2R1
The Remove action is supported only from Junos Space Network Management Platform Release 15.2R1 onward.