Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Staging Scripts on Devices

Junos Space Network Management Platform enables you to stage a single script or multiple scripts on one device or multiple devices simultaneously. Staging a script enables you to hold a script on a device, ready to be executed when required. When you select scripts that are previously staged on one or more devices from the Scripts page, then the GUI lists only the devices that are not associated with any of the selected scripts and the devices with older versions of the selected scripts. This listing of the devices allows you to associate scripts with new devices and also upgrade scripts to the latest version on already associated devices.

To stage a script on devices:

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

    The Scripts page appears.

  2. Select the scripts that you want to stage on one or more devices. The selected scripts are highlighted.
  3. Select Stage Scripts on Devices from the Actions menu.

    The Stage Scripts on Device(s) page appears, displaying:

    • A list of the selected scripts and the latest versions of the scripts. By default, the latest version of the script is staged on the selected devices. However, to stage a previous version of the script, select the suitable version from the drop-down list below the Version column.

    • A list of the Junos Space Platform devices that are not associated with any of the selected scripts and also the devices with the older versions of the selected scripts.

  4. (Optional) Keep the Enable Scripts on Devices check box selected if you want the scripts to be enabled and ready to be executed when you stage them on devices from Junos Space Platform. Clear this check box if you want the scripts to be disabled on the devices.
  5. (Optional) To include the devices on which the selected scripts are already staged , select the Show existing Staged Devices check box. The device list is updated to include devices on which the script is already staged.
  6. Select the devices to stage the selected script.

    You can select devices by using one of the following selection modes—manually, on the basis of tags, or by using a comma-separated values (CSV) file. These options are mutually exclusive. If you select one, the others are disabled.

    Note:

    By default, the Select Device Manually option is selected and the list of devices that are not associated with any of the selected scripts and devices with the older versions of the selected scripts is displayed.

    • To select devices manually:

      • Click the Select Device Manually option and select the devices on which you want to stage the script. The Select Devices status bar shows the total number of devices that you selected; the status bar is dynamically updated as you select the devices.

      • To select all devices, select the check box in the column header next to the Host Name column.

    • To select devices on the basis of tags:

      1. Click the Select by Tags option. The Select by tags list is activated.

      2. Click the arrow on the Select by Tags list. A list of tags defined on devices in the Junos Space system appears, displaying two categories of tags—Public and Private.

        Note:

        No tag is displayed if none of the devices is associated with any tag. You need to tag the devices on the Device Management page before you can use the Select by Tags option.

      3. 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.

        As you select the tags, the total number of devices associated with the selected tags appears just above the device display table. For example, if there are six devices associated with the selected tags, then 6 items selected is displayed.

        The selected tags appear next to the Tags Selected label. An [X] icon appears after each tag name. You can click the [X] icon to clear any tag from the list. The device count decrements accordingly.

        The device display table displays the devices associated with the selected tags.

    • From Junos Space Platform Release 17.2R1 onward, when you select devices by CSV, you can choose to select all managed devices. Select the Include All Managed Devices check box to list all managed devices for selection.

      To select devices by using a CSV file:

      1. Select the Select by CSV option.

      2. Click Browse to navigate to the file location on your computer and select the CSV file containing the list of devices on which you want to stage the script.

        Tip:

        For a sample CSV file, click the Sample CSV link. You are prompted to save the file. Save the file to your computer and open it by using an application such as Microsoft Excel.

      3. Click Upload to upload the CSV file.

        From Release 16.1R2 onward, when you upload a CSV file to select devices from, Junos Space Platform verifies the devices in the CSV file. If the CSV file contains devices to which the changes do not apply, a warning message appears which says Few devices are not selected due to precondition failure. Please click "View inapplicable devices" for more details.

        You can click the View inapplicable devices link to review the list of devices that are excluded from the update. The reason for exclusion is listed as an error message against each device.

    • From Junos Space Platform Release 18.2R1 onward, you can select devices based on saved filters

      To select devices by using a saved filter:

      1. Select the Select by Filter option.

      2. Select the filter from the list of saved filters.

        The devices associated with the selected filter appears in the grid.

  7. (Optional) To schedule a time for staging the script, select the Schedule at a later time check box and use the calendar icon and drop-down list to specify the date and time, respectively, when you want the script to be staged.
  8. Click Stage. The script is staged on the selected device or devices. The Stage Scripts Information page displays the job ID.
  9. Perform one of the following actions on the Stage Scripts Information page:
    • To verify the status of this job, click the job ID in this page.

      The Job Management page appears. Double-click the row corresponding to the staging job. The Script Management Job Status page appears and the Description column on this page displays whether or not the script is staged successfully and reasons for failure (if staging of the script failed). If Junos Space Platform detects an SSH fingerprint mismatch between the one on the device and that in the Junos Space Platform database, the connection is dropped. The Connection Status displays Down and Authentication Status displays Fingerprint Conflict on the Device Management page. The View Job Details page displays an error message. For more information about the error messages and solutions, see Common Error Messages in Device-Related Operations.

    • Click OK to go back to the Scripts page.

On the Scripts page, click View in the Associations column of that staged script to view the details of the Script - Device association. For more information about viewing the device associations for scripts, see Viewing Device Association of Scripts.

On the Job Management page, you can export details about staging of a script as a CSV file to your local file system:

  1. On the Junos Space Platform UI, select Jobs > Job Management.

    The Job Management page appears.

  2. Double-click the row corresponding to the staging job.

    The Script Management Job Status page appears.

  3. Click Export as CSV.

    You are prompted to save the file.

  4. Click OK on the File Save page to save the file to your local file system.

  5. After you save the file, to return to the Job Management page, click OK on the Exporting Script Job page.

    Use an application such as Microsoft Excel to open the downloaded file from your local system.

On the left pane of the UI, select Images and Scripts > Scripts to return to the Scripts page.

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
18.2
From Junos Space Platform Release 18.2R1 onward, you can select devices based on saved filters
17.2
From Junos Space Platform Release 17.2R1 onward, when you select devices by CSV, you can choose to select all managed devices. Select the Include All Managed Devices check box to list all managed devices for selection.