Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Executing a Script on the Physical Interfaces

You can use Junos Space Network Management Platform to trigger the execution of op scripts on one or more devices simultaneously. Commit and event scripts are automatically activated after they are enabled. Commit scripts are triggered every time a commit is called on the device and event scripts are triggered every time an event occurs on the device or if a time is specified.

You can execute a script on the physical interfaces of one device or multiple devices.

Note:

You can execute scrips on more than 200 devices only if the scripts do not require XPath processing. Scripts that do not require XPath processing include scripts without device-specific or entity-specific parameters and with /, //, or /device as context.

To execute a script on the physical interfaces:

  1. On the Junos Space Network Management Platform user interface, select Devices > Device Management.

    The Device Management page is displayed.

  2. Select the device (or multiple devices) and select Device Inventory > View Physical Interfaces from the Actions menu.

    The View Physical Interfaces page is displayed.

  3. Right-click the physical interfaces on which the script has to be executed and select Execute Scripts.

    The Execute Scripts page displays the following scripts:

    • Scripts that are associated with and enabled (device scripts) on the selected devices

    • Scripts whose execution type matches your selection. If you selected multiple devices, only scripts whose EXECUTIONTYPE is set to GROUPEDEXECUTION are displayed. If you selected a single device, scripts whose EXECUTIONTYPE is set to SINGLEEXECUTION and GROUPEDEXECUTION are displayed.

    • Scripts whose context matches the physical interface context

    The Execute Scripts Page in the Devices Workspace table lists the columns on the Execute Scripts page and their descriptions.

  4. Select the script that you want to execute on the physical interfaces manually or by using tags.

    1. To select the script manually:

      1. Click the Select Manually option button.

        This option button is selected by default.

      2. Select the script.


    2. To select the script by using tags:

      1. Click the Select by tags option button.

      2. From the Select by tags drop-down list, select an appropriate tag.

      3. Click OK.

        The list of scripts is further filtered by the tag you selected.

      4. Select the script.

  5. (Optional) To enter the values for the parameters of the script, click the appropriate cell in the Value column.
    • If you enter a value for a parameter that is a Password field, the value you enter is hidden.

    • If you enter a value for a parameter that is a Confirm Password field, a pop-up window is displayed. Enter the password again and click OK.

  6. Select whether to execute the script now or schedule the execution for a later time:

    1. To execute the script on the physical interfaces now:

      1. Click Execute.

        The Script Results page appears. The Script Results Page table lists the columns and their descriptions.

        The lower area of the Script Results page displays the results of the script execution. If you executed a local script that contains the GROUPBYDEVICE annotation set to TRUE on the physical interfaces of multiple devices, click the appropriate device in the Device Name column to view the script execution results on the physical interface of the device.

      2. Click Close (at the bottom of the page).

        You are redirected to the View Physical Interfaces page.

      3. Click Back (at the top-left corner) to return to the Device Management page.


    2. To schedule the execution of the script on the physical interfaces for a later time:

      1. Select the Schedule at a later time check box.

      2. Enter the date in the Date field in the MM/DD/YYYY format.

      3. Enter the time in the Time field in the hh:mm format.

      4. Click Execute.

        The Job Information dialog box displays a link to the job ID. Click the Job ID link to view the status of this task on the Job Management page.

      5. Click OK to close the Job Information dialog box.

        You are redirected to the View Physical Interfaces page.

      6. Click Back (at the top-left corner) to return to the Device Management page.