Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Modifying Scripts

    You can use Junos Space Network Management Platform to modify the script type, script contents, and the script version. You can also add your comments describing the script. When you modify a script, the script is saved as the latest version by default. Junos Space Platform modifies both associated and unassociated scripts.To modify the script type for multiple scripts, see Modifying Script Types.

    You can modify and save a script to the Junos Space Platform database without staging the modified (or the latest) script on the devices. When you do not stage the latest version, the older script continues to exist on the devices on which it was previously staged. To both save and stage the modified script, use the Save & Stage action instead of Save & Exit action while modifying the script.

    To modify a script:

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

      The Scripts page displays the scripts that you imported into Junos Space Platform.

    2. Select the script that you want to modify.
    3. Select Modify Script from the shortcut menu or click the Modify Script icon.

      The Modify Script page displays the details of the script.

    4. You can modify the script type, version, script contents, and the comments about the script. You cannot modify the script type if the script is associated with any device.

      If you have multiple versions of the script, select the correct version of the script from the Version list to modify the script. By default, the latest version of the script is displayed. The changes that you make are saved as the latest version of the script.

    5. Perform one of the following tasks:
      • Click Cancel if you do not want to make any changes to the script.

        You are returned to the Scripts page.

      • Click Save & Exit to save the changes to the script and exit the Modify Script page. The script is saved as the latest version in the Junos Space database.

        You are returned to the Scripts page.

      • Click Save & Stage to save the changes to the script as the latest version in the Junos Space database and to stage the latest version of the script on devices.

        The Stage Script on Device(s) page appears, displaying a list of all the associated devices.

        Tip: If you do not see any device listed, it means that no previous version of the script is associated with any of the devices. First, stage the script by using the Stage Scripts on Devices task from the Actions menu, and then modify and stage the modified script by using the Modify Script task.

        To stage the modified script:

        1. On the Stage Scripts on Device(s) page, select the devices on which you want the modified script to be staged, by using one of the following selection modes—manually or on the basis of tags.These options are mutually exclusive. If you select one, the other is disabled.

          Note: By default, the Select by Device option is selected and the complete list of devices is displayed. If you have tagged any of the devices and you want only those tagged devices with which the scripts are associated to be displayed, choose the Select by tags option.

          • To select devices manually:
            • Click the Select by Device option and select the devices on which you want to stage the modified script. The Select Devices status bar shows the total number of devices that you have selected; the status bar is dynamically updated as you select the devices.
            • To select all the devices, select the check box in the column header next to Host Name.
          • To select devices on the basis of tags:
            • Click the Select by Tags option. The Select by tags list is activated.
            • Click the arrow on the Select by Tags list. A list of tags defined on devices in Junos Space Platform appears, displaying two categories of tags—Public and Private.

              To select tags, perform one of the following actions :

              • Select the check boxes next to the tag names to select the desired tags and click OK.
              • To search for a specific tag, enter the first few letters of the tag name in the Select by Tags field to the left of the OK button. If a match is found, a suggestion is made. Select the suggested match and click OK.

              The total number of devices associated with the selected tags appears in the Select Devices status bar above the options.

              The selected tags appear in the status bar below the option buttons, next to the Tags Selected label. An [X] icon appears after each tag name. You can use the [X] icon to clear any tag from the list. The device count in the Select Devices status bar decrements accordingly. The table below this status bar displays the selected devices.

        2. (Optional) To schedule a time for staging the script, select the Schedule at a later time check box and specify the date and time when you want the script to be staged.
        3. Click OK on the Stage Script on Device(s) page.

          You are returned to the Scripts page. If the modification of the script is successful, the Latest Revision column on this page displays the latest and updated script version number.

    6. (Optional) To verify the changes made, you can view the details of the script. See Viewing Script Details.

      The Latest Version column displays the latest version.

    7. Click Cancel to withdraw your changes and return to the Scripts page.

    For troubleshooting, see the following log: /var/log/jboss/server.log. No audit logs are generated for this task.

    To verify whether the latest script version is successfully staged on devices:

    1. On the Scripts page, select the script (if it is not selected).

      Typically, the script remains selected on the Scripts page when you are returned to this page after the modification of the script.

    2. Select View Associated Devices from the Actions menu.

      The View Associated Device page appears. If the staging is successful, then the version numbers on the Latest Version and Staged Version columns must match.

      To return to the Scripts page, click Scripts on the breadcrumb.

    Modified: 2017-06-01